Results 1 to 2 of 2

Thread: tab content cookies ie7

  1. #1
    Join Date
    Oct 2007
    Location
    belgium
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post tab content cookies ie7

    1) Script Title: Ajax Tabs Content (older version)

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

    3) Describe problem:
    Hello, I have used the tab content script here bmxaction.net/member/wessite

    In safari and firefox it is working good but in ie7 it seems there aren't any cookies set; so when i reload the page i always get back to the deafult tab (first tab content)

    Can someone help me with this?

    Thanks
    Last edited by ddadmin; 03-13-2008 at 09:59 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    My guess is the changes you made to the original cookie functions of the script, specifically:

    Code:
    function saveselectedtabindex(ulid, index){ //remember currently selected tab (based on order relative to other tabs)
    if (enabletabpersistence==1) //if persistence feature turned on
    var path = location.href;
    setCookie(ulid, index, path.replace(/http:\/\/www.bmxaction.net/,''))
    }
    
    function getCookie(Name){ 
    var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
    if (document.cookie.match(re)) //if cookie found
    return document.cookie.match(re)[0].split("=")[1] //return its value
    return ""
    }
    
    function setCookie(name, value, path){
    document.cookie = name+"="+value + "; path=" + path //cookie value is domain wide (path=/)
    }
    is causing IE to not store the value. I can't quite tell yet which line(s) exactly is the problem, but have you tried reverting back to the original code for the above, and gradually introducing your own changes while verifying the cookie function still works in IE?

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
  •