Hi all,
I have a checkbox on my site that needs it's status to be changed dynamically depending on the status of a cookie, the script I have works fine in IE yet not in Firefox, I have tried getElementById, getElementsByNa me and placing the checkbox in a form and obtaining the element that way but nothing seems to work, Firefox can't seem to find the checkbox.
Here is the code that I am currently using
any suggestions?
Thanks in advance.
I have a checkbox on my site that needs it's status to be changed dynamically depending on the status of a cookie, the script I have works fine in IE yet not in Firefox, I have tried getElementById, getElementsByNa me and placing the checkbox in a form and obtaining the element that way but nothing seems to work, Firefox can't seem to find the checkbox.
Here is the code that I am currently using
Code:
function infocheck(){
var disabled = getCookie('disabled');
var box = document.settings.toggle;
var pageid = getCookie('currpage');
if (pageid == pid){
if (disabled === null){
box.checked = true;
}
else{
box.checked = false;
}
}
}
Thanks in advance.
Comment