Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: switchmenu IE problem (remembers only the first link clicked)

  1. #1
    Join Date
    Feb 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default switchmenu IE problem (remembers only the first link clicked)

    1) Script Title: switchmenu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...switchmenu.htm

    3) Describe problem:
    I've implemented the script switchmenu, and it works just fine in FF, but not in IE. In IE it remembers the first link you click on, and only that one. I really need some help with this.

    I'm using the switchmenu at www.itko.dk/home

    please help

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Actually you've implemented the original nature of Switch Menu in two of your menu items : Karriere and Fagbeskrivelse and both of those items are working correctly without any problem in both IE and Firefox.

    Have a look at the following code which is the correct format for the Switch Menu implementation according to the original script

    Code:
    <div style="padding-left: 0px; padding-top: 3px">
    -&nbsp;&nbsp;<a class=menu onclick="javascript: switchmenu('sub4');" href="http://www.itko.dk/home/fagbeskrivelse/index.php">fagbeskrivelse</a><div>
    <span class=submenu id=sub4 style="margin-left: 25px">
    - <a class=menu_sub href="http://www.itko.dk/home/fagbeskrivelse/fageneenkeltvis.php">fagene enkeltvis</a>
    </span>
    Now the below mentioned code is from your page

    Code:
    <div style="padding-left:0px;padding-top: 3px;">
    -&nbsp;&nbsp;<a class="menu" href="http://www.itko.dk/home/index.php" onclick="javascript: SwitchMenu('sub1');">Forside</a>
    </div>
    <span class="submenu" style="margin-left: 25px;" id="sub1"></span>
    If you look at your code furnished just above, look at the line that I colored blue there is nothing to be displayed there so there is no switch menu there and I simply don't understand if you don't have a sub menu there why you used a SPAN element there.

    Please let me know If I am stating some incorrect thing.

    Regards

  3. #3
    Join Date
    Feb 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for taking the time to help.

    You say that the two elements are working fine in IE?! not on the computers I've testet the script on. Thats odd... hmm

    I don't think the problem is that some of the <span> tags are empty, in fact I've testet the script without these empty, and then the script doesn't work in either FF or IE...

    the problem is that IE only remembers the link clicked. If I print out the cookievalue with an alert, the value is always the same (the first link clicked).

    why, oh God why?

  4. #4
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    I've tried it with IE 7 and it is showing the submenu. I don't know which version of IE you've used.

    I've attached a screenshot of the same with this posting.

  5. #5
    Join Date
    Feb 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    what if you click on another link such as "Karriere", does the menu then work (show "statements") ?

    I've teste it on IE 6 og 7.....

  6. #6
    Join Date
    Feb 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok... here is something strange: I've opened to IE windows, and it works in one of them. But this is the first one in about 25 IE windows...

    Have you tried to open a new IE window and see if it still works? It seems like it isn't very stable.... and as it is now, its a now go

  7. #7
    Join Date
    Feb 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    in case it's not clear, I still need help...

  8. #8
    Join Date
    Feb 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    the problem is that IE doesn't rewrite the cookie... It only saves the cookie ones. Help please. I'm lost here...

  9. #9
    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

    Fatal error: Class 'Afour' not found in /web/SITE/ITKO/www/home/index.php on line 17
    - John
    ________________________

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

  10. #10
    Join Date
    Feb 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks a lot... it works now. :-)

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
  •