tpeck
07-20-2011, 03:28 PM
I have a function called onload that includes this:
window.onload=new function(){
...
if (menuletter!=false){
document.cookie="hddrv="+(menuletter)+"; path=/; expires="+exp.toGMTString();
document.enterIndex.src='enter2.gif';
// window.setTimeout("goIndex()",7000);
// return false;
}
...
}
<img border="0" name="enterIndex" src="enter1.gif" width="413" height="41">
If I uncomment the two lines and comment the document image swap line, they execute perfectly, so the routine works.
But if I try to do the image swap instead of the two commented lines, it doesn't swap.
Of course, the image enter1.gif and enter2.gif exist.
What am I doing wrong?
window.onload=new function(){
...
if (menuletter!=false){
document.cookie="hddrv="+(menuletter)+"; path=/; expires="+exp.toGMTString();
document.enterIndex.src='enter2.gif';
// window.setTimeout("goIndex()",7000);
// return false;
}
...
}
<img border="0" name="enterIndex" src="enter1.gif" width="413" height="41">
If I uncomment the two lines and comment the document image swap line, they execute perfectly, so the routine works.
But if I try to do the image swap instead of the two commented lines, it doesn't swap.
Of course, the image enter1.gif and enter2.gif exist.
What am I doing wrong?