View Full Version : tab content cookies ie7

03-13-2008, 12:52 PM
1) Script Title: Ajax Tabs Content (older version)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

3) Describe problem:
Hello, I have used the tab content script here bmxaction.net/member/wessite (http://www.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?


03-13-2008, 10:11 PM
My guess is the changes you made to the original cookie functions of the script, specifically:

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?