Results 1 to 3 of 3

Thread: Switch Menu II... Help need please

  1. #1
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Menu II... Help need please

    Hello,

    Is there any way to make the switch menu II script behave like the original switch menu. By this I mean any open menu automatically collapses when another menu is clicked, as at the moment to make a menu close you have to click on it again. I only want to be able to open one menu at a time to avoid scrolling problems. I am using IE6

    I'm hoping this is possible and that some code wiz can point me in the right direction.

    Thanks for your help

    Greg

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes. In the menu.js file find the function SetSlide(), at the very beginnng of that function, it looks like this:
    Code:
    function SetSlide()
    {   
    			if (window.TIMER_SLIDE) clearInterval(TIMER_SLIDE) //DD added code
    Make it look like this:

    Code:
    function SetSlide()
    {   
    var tmp1=OBJ_VIEW, tmp2=OBJ_SLIDE, tmp3=MainDiv
    subs=document.getElementsByTagName('DIV')
    for (i = 0; i < subs.length; i++)
    if (subs[i].className=='subMenu'&&subs[i].getAttribute("state", 0)!="0"&&subs[i]!==tmp1){
    OBJ_VIEW=subs[i]
    OBJ_SLIDE=subs[i].parentNode
    MainDiv=subs[i].parentNode.parentNode
    RunSlide()
    }
    OBJ_VIEW=tmp1
    OBJ_SLIDE=tmp2
    MainDiv=tmp3
      
    			if (window.TIMER_SLIDE) clearInterval(TIMER_SLIDE) //DD added code
    Enjoy!
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks that works ok.

    Do you know if there is anyway to make the 'topItem' class go to an url when clicked?
    At the moment I have:

    <div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this);"><a href="home/home.htm" target="mainFrame">Home</a></div>

    But this only follows the link when the text of the menu item is clicked and not the whole 'button'

    I have tried onClick=parent.mainFrame.location='home/home.htm" and other variants along those lines but to no avail

    Any help would be greatly appreciated

    Thanks Greg

Bookmarks

Posting Permissions

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