Javascript Menu

Results 1 to 3 of 3

Thread: Javascript Menu

  1. #1
    K Thompson Guest

    Default Javascript Menu

    CAn anyone suggest a tutorial to achieve the following ( if it is possible ? ).<BR><BR>I have a framed page with 5 links on the top frame which loads the url into the lower frame. WHat i would like is when you click the link, it changes colour and stops being a link. When the next link is pressed the former one regains it&#039s previous state and the newly clicked one becomes static.<BR><BR>Many thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Javascript Menu

    you can&#039t stop them being links (reliably), but it&#039s easy enough to change the colour using CSS<BR><BR>jason

  3. #3
    fifthermurf Guest

    Default RE: Javascript Menu .... maybe something like this

    What you might try is embed the link in a SPAN like:<BR> &#060;span id="sp"&#062; &#060;a id="lnk" href&#062; ???? &#060;/a&#062;&#060;/span&#062;<BR>Then catch the click on the AHREF on call out to a javascript function that would DHTML the &#060;span&#062;&#039s innerHTML to be the Text minus the HREF&#039s. Then write a procedure to set it back when you go to another link.<BR><BR>function somethin()<BR>var eSrc = window.event.srcElement;<BR>window.event.cancelBub ble = true;<BR>sp.innerHTML = lnk.innerTEXT; ??? somethin like that<BR>}<BR>NOT SUPER ROBUST BUT YOU GET THE IDEA<BR>also you will want to store the lost HTML in a hidden form element or global variable<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts