[CODE]function go() {
if (document.cookie.indexOf(‘H4_fly=’) >= 0) {
var d = new Date();
d.setTime(d.getTime() – 10000);
document.cookie = ‘H4_fly=0;expires=’ + d.toUTCString();
document.getElementById(‘flyForm’).submit();
} else {
history.back();
}
}
The <body onload=”go()”> clearly calls the go function as above, which submits the form ‘flyForm’ on page load – so good so far. What does the if statement determine, and maybe more importantly what is written to document.cookie if the if statement is executed ?
Reason for the question. Well on my local system in the UK everything works well, my php file populates the html form and it is sent on loading the page. My webhost is in Germany, and their server is set one hour ahead of the UK, and on transfering these files to that the behaviour has become somewhat erratic. It works first time fine, and it works if you clear cookies or delete private data on Firefox. Do I need to modify the – 10000 to take into account the time difference, and if so, to what.
All help very much appreciated.
Blu