Results 1 to 4 of 4

Thread: Switch Menu II Cookies prob!

  1. #1
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Switch Menu II Cookies prob!

    1) Script Title: Switch Menu II

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

    3) Describe problem: how can i disable the cookies (ie tends to block them) and defalt the menus to be closed on the page load.

  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

    Find this line in xpmenuv21.js -

    Code:
    function UpdateUserCookie(aryIndex)
    {
        date = new Date();
        date.setTime(date.getTime() + (1000 * 60 * 60 * 24 * 30)); 
        document.cookie = "xpMenuCookv2" + "=" + escape(menuObjArray[4].toString()) + "; expires=" + date.toGMTString();  
       
    }
    and comment it out -

    Code:
    function UpdateUserCookie(aryIndex)
    {
        date = new Date();
        date.setTime(date.getTime() + (1000 * 60 * 60 * 24 * 30)); 
        // document.cookie = "xpMenuCookv2" + "=" + escape(menuObjArray[4].toString()) + "; expires=" + date.toGMTString();
       
    }
    It's not clear if you also want the menus closed or if that was a part of your description of the problem but, to have any given menu closed, use:

    HTML Code:
    <div class="subMenu" style="display:none;">
    - John
    ________________________

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

  3. #3
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ie still blocks the content, even with that line commented...

    Edit: is there anyway to stop i.e from blocking the menu?
    Last edited by _tech_dude_; 09-30-2006 at 12:19 PM.

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

    What do you mean by blocks the content or blocks the menu? Anyways, I should have added to my previous post that any existing cookie will still control the display of the page. Also, that if the script is cached, it will still set the cookie. So, you need to clear both your cache and your cookies.

    One other thought, if by blocking the menu you mean the security bar, that is a local only 'feature' of IE that is activated by any javascript. Does this happen on the demo page that's live here on Dynamic Drive? If not, it will not happen with your code either once the page is live.
    - John
    ________________________

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

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
  •