Well, I cannot comment on problems with other browsers without a link to your page, the script as presented on DD works in IE and FF, other than to say your use of lists instead of the provided heading/division pairs might be the culprit. You could try using a heading and then have a list inside the division.
Anyways, I also wanted a link to the script here on DD to save me time hunting for it and to be sure I had the right one. I think I found it and have come up with this code that should work, substitute (changes red):
Code:
function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && ccollect.length>0){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}
if (selectedItem==""){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0"
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
}
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}
For the existing function of the same name, don't try to edit it, just replace it - to make sure that you don't miss anything and that I didn't miss highlighting anything. It will detect if php has set any of the items to display:block and skip the whole cookie business if it has, otherwise, persistence will work as usual.
Bookmarks