Results 1 to 19 of 19

Thread: Trace Bar Question

  1. #1

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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?

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Nope!
    I can't picture what you mean. Can you explain further please?
    Mark
    -------------------

  3. #3

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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).

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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?
    Mark
    -------------------

  5. #5

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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?

  6. #6
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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)
    Mark
    -------------------

  7. #7

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Cheers Mark I will check it and get back to you!

  8. #8

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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.

  9. #9
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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>")
    Mark
    -------------------

  10. #10

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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.

  11. #11

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Cheers Mark,

    I will try that out today... I'm sorry that this one is so damn hard. But I feel that if this is worked out then it could be useful for many other people too...

    I will get back to you.

  12. #12
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    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.
    Mark
    -------------------

  13. #13
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    I can get on with some proper work now!
    Mark
    -------------------

  14. #14

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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!!!

  15. #15
    hellswraith
    Guest
    A little late, but this link might be very usefull to you.
    http://www.4guysfromrolla.com/webtech/110498-2.shtml

    Hope it helps.

  16. #16

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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!

  17. #17
    hellswraith
    Guest
    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.

  18. #18
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    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

  19. #19

    Thread Starter
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    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
  •  



Click Here to Expand Forum to Full Width