You are here: irt.org | BBS | Re: Jason Nugent please help. One last thing re:my rollovers [This BBS is closed]
Posted by Jason Nugent on September 07, 1998 at 06:47:08:
In Reply to: Jason Nugent please help. One last thing re:my rollovers posted by Darren Perara on September 07, 1998 at 01:51:09:
: What could I do with the "default.gif" NAME that currently requires four names (left,right,forw,back) and obviously doesn't work.
: Thanks for your help,
: Darren.
You cannot assign more than a single name to an image. You are going to have to define the same image four separate times, each with a different name.
image1 = new Image ();
image1.src = "image1.gif";
image2 = new Image ();
image2.src = "image1.gif"; // save as before
image3 = new Image ();
image3.src = "image3.gif"; // ditto
image4 = new Image ();
image4.src = "image1.gif"; // ditto
... and then place four separate copies of the image in your html document.
The other alternative is to just forego using NAME at all and just use the document images[] array and refer to an image through its number in the array. This is not really that intuitive but will help you move towards creating nice HTML 4 compliant code. (the NAME attribute is not supported in HTML 4).
I hope this helps,
Jason
Follow-ups:
You are here: irt.org | BBS | Re: Jason Nugent please help. One last thing re:my rollovers [This BBS is closed]