Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 08-29-2007, 12:47 PM You Are Here Script
DaveTodd's Avatar
Evil Psycho Alien

Posts: 684
Location: Sheffield, England
Trades: 0
I'm wondering if it's possible to create // find a script to in the top left corner of every page on my site to give the location of the page...

For exampe, homepage would read
Home

Shopping page would read
Home / Shopping

Sleeping Bags page would read
Home / Shopping / Sleeping Bags

You get the idea. It sounds kinda complicated to me as the words for the page will not be the title tag or any other tag. I would also like each word to be a link to that page if possible.

Any ideas would be greatly appreciated.
__________________
take care,
Dave ;)

Please login or register to view this content. Registration is FREE
DaveTodd is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-31-2007, 05:33 PM Re: You Are Here Script
Skilled Talker

Posts: 62
Name: Tom Wright
Location: Brighton, UK
Trades: 0
Hi Dave,
Is there any reason you wanted this to be accomplished in js?
What backend tech are you using? PHP? ASP? Or just static html?
Because it'd probably be easier (and more reliable) to produce a backend solution.
__________________
My site:
Please login or register to view this content. Registration is FREE
tomythius is offline
Reply With Quote
View Public Profile
 
Old 08-31-2007, 08:39 PM Re: You Are Here Script
Defies a Status

Posts: 1,605
Trades: 0
I'm sure it can be scripted using php.

Html breadcrumbs that I have seen are all hand coded to the page. The couple that I have seen in html look like a nighmare to write and worse to maintain.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 09-01-2007, 03:19 AM Re: You Are Here Script
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Make an empty span in the top of every page, and have them all call out to a js file that runs a giant if statement, comparing the URL of the current page against a whole bunch of preset values, and when you find a match, set that span's innerHTML property.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 09-01-2007, 05:27 AM Re: You Are Here Script
brandrocker's Avatar
Experienced Talker

Posts: 30
Name: CONFIDENTIAL
Location: India
Trades: 0
You can do it using PHP. If you are storing the categories in a table with parent-child relationship the job is much easier for you.

Simply, make a select query to retrieve the parent category (or categories) and show it at the top with a live link to the desired page. Links will be generated on the fly.

Good luck.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
brandrocker is offline
Reply With Quote
View Public Profile Visit brandrocker's homepage!
 
Old 09-01-2007, 11:41 AM Re: You Are Here Script
Defies a Status

Posts: 1,605
Trades: 0
I looked this up for you. There is no point in reinventing the wheel.

A public domain (GPL) php version can be found here:

http://www.mindpalette.com/tutorials...umbs/index.php
An improved version of the above can be found at http://www.slashchick.com/?p=206

And a Java version can be found here
http://www.mindpalette.com/tutorials...s_JS/index.php

I am glad I found the improved version of the php one as the first version made a live link out of the current page.

Hve fun!
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to You Are Here Script
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23511 seconds with 12 queries