|
-
Apr 3rd, 2001, 03:32 AM
#1
Thread Starter
Fanatic Member
I have a question..
I am trying to Dynamically create a trace bar or some people call them "Breadcrumbs". Does anyone know of an Applet or a JavaScript that can create them Dynamically?
-
Apr 3rd, 2001, 04:04 AM
#2
Frenzied Member
Nope!
I can't picture what you mean. Can you explain further please?
-
Apr 3rd, 2001, 04:52 AM
#3
Thread Starter
Fanatic Member
Mark, Cheers for having a look , how are you? here is a description of what I am trying to do:
What I am trying to do is the following (see picture) basically it tells you where you have been so that (stupid) users don't get lost in the site...Also means that the (stupid) users can get back to the home page!
I would like this to be dynamic so that there is as little coding as possible (Maybe a Jave Applet or something like that).
-
Apr 3rd, 2001, 05:12 AM
#4
Frenzied Member
a bit like where is says:
VB Q and A > Other Languages > XML, HTML, Javascript, Web and CGI > Trace Bar Question
at the top of this page?
Is that the sort of thing you want?
-
Apr 3rd, 2001, 06:55 AM
#5
Thread Starter
Fanatic Member
Originally posted by Mark Sreeves
a bit like where is says:
VB Q and A > Other Languages > XML, HTML, Javascript, Web and CGI > Trace Bar Question
at the top of this page?
Is that the sort of thing you want?
Yep. It needs to be Dynamic so it checks all the site and knows (if you get my drift).. I know it's a big ask.... But I am sure that it is possible. Any ideas?
-
Apr 3rd, 2001, 08:30 AM
#6
Frenzied Member
Is this getting close to what you want?
paste this into each file
Code:
<script language=Javascript src="/loc.js">
</script>
paste into a file called loc.js located on the webroot
Code:
var loc = '' + window.location;
var arrLoc = loc.split('/');
var strOut ='';
var strOutB = '';
for (var i=0; i< arrLoc.length; i++)
{
strOut += arrLoc[i] + '/'
strOutB +='<a href="' + strOut + '">' + arrLoc[i]+'/' + '</a>'
}
document.write(strOutB)
-
Apr 3rd, 2001, 08:37 AM
#7
Thread Starter
Fanatic Member
Cheers Mark I will check it and get back to you!
-
Apr 3rd, 2001, 08:46 AM
#8
Thread Starter
Fanatic Member
Sorry mate not quite what we were after... I have got someone here to write a better description of what we want... Cheers anyway... The way that I see what we want is exactly like the trail that appears on the top of the VB forum saying which Forum you are in anf ultimately which thread.. We want to be able to do the same, but the problem is making it dynamic and so that it knows where all pages go.......
It seems to me that it might not be possible... I will post the description later.
-
Apr 3rd, 2001, 09:14 AM
#9
Frenzied Member
I've done it now so I may as well post it...
Code:
var loc = '' + window.location;
var arrLoc = loc.split('/');
var strOut ='';
var strOutB = '';
for (var i=0; i < arrLoc.length; i++)
{
strOut += arrLoc[i] + '/'
if(i>1){
strOutB +='<a href="' + strOut + '"><b> ' + arrLoc[i] + '</b></a><b> > </b>'
}
}
strOutB = strOutB.substring(0,strOutB.length -6)
document.write("<small>")
document.write(strOutB)
document.write("</small><BR>")
-
Apr 3rd, 2001, 09:58 AM
#10
Thread Starter
Fanatic Member
Thanks for the script, it was a nice script! . Here is what we are after - better description :
-----------------------------------------------------------------
All of our pages reside at the root level. The trace bar should indicate the links you have to go through, before you reach your detination page from the home page. It should be based on page titles. The Hierachy of the site should not effect the trace bar only the way the pages are linked together should be the data source for the trace bar.
Basically alot like the VB Forums one above.... but we don't want to hard code the trace bar in each page, we want it to creat itself dynamically.
---------------------------------------------------------------
Sorry to waste your time Mark with your other scripts. that was from my colleague.... Cheers for all your help Mark.
-
Apr 5th, 2001, 02:14 AM
#11
Thread Starter
Fanatic Member
-
Apr 5th, 2001, 05:25 AM
#12
Frenzied Member
I'VE DONE IT!!!!
It works a treat!!!!!!!
I'm a bit reluctant to make the code avaiable to everyone though.
email me if you want it.
-
Apr 5th, 2001, 05:28 AM
#13
Frenzied Member
I can get on with some proper work now!
-
Apr 5th, 2001, 06:46 AM
#14
Thread Starter
Fanatic Member
Does it work ok on Windows IE? Thats what we use on our Intranet and we would prefer it not to crash it.... Well done though... I will email you for the code.... Thanks for all your help mate!!!
-
Apr 8th, 2001, 01:44 PM
#15
A little late, but this link might be very usefull to you.
http://www.4guysfromrolla.com/webtech/110498-2.shtml
Hope it helps.
-
Apr 9th, 2001, 02:56 AM
#16
Thread Starter
Fanatic Member
Originally posted by Mark Sreeves
thanks for the link hellswraith
but...
I'm not getting at anyone here...
when I reply to a post I try to take into account what question is being asked.
Yes it would be p i s s easy using Active Server Pages but the original question was:
Mark,
Cheers for the Email... my coder says that he will use the serverside solution that you suggested. He was just hoping that it was possible to do it in a different way.... I guess he wanted too much! 
Thanks again Mark, you are a life saver!
-
Apr 9th, 2001, 04:07 PM
#17
Hey Mark, thanks for the criticism, I enjoyed it. Sometimes people ask questions, and they may not know exactly what they are asking for. I just offered up another way to do it. Sometimes when I ask a question, people respond with things that I thought I shouldn't use, but instead they opened my eyes to why I should or another way to approach a problem I hadn't thought about.
Despite what your post says, you ARE trying to get at me. My post may not have helped Chris, but it may have led another person to an answer, and since the topic is related, I find no error in that.
Have a nice day everyone.
-
Apr 9th, 2001, 04:56 PM
#18
PowerPoster
I agree with you hellswraith. I find that any solution is MUCH better than no solution. And, if people had not suggested alternate ways to help me accomlish something, i probably would not know about half of the stuff that i do!
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Apr 11th, 2001, 04:23 AM
#19
Thread Starter
Fanatic Member
Thank you to everyone... Hellswrath, your assistance was useful and has been used in a different site with a different use. Unfortunately couldn't be used in the site we are currently making... The site we are curently making has now got working trail bars thanks to the code from Mark... cheers to both of you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|