View Full Version : image change fails

07-20-2011, 04: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();
// 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?

07-20-2011, 05:50 PM
1. remove the "new" keyword from the onload function
2. what is menuletter?
3. what is goIndex() ?