Forum Moderators: open

Message Too Old, No Replies

Rollover Error

         

smilinjack

1:12 pm on Nov 15, 2004 (gmt 0)

10+ Year Member



Greetings,
This is a portion of the code I am using.
As per forum guidelines I am precluded from indicating the url, so it may be hard to get perspective.

<SCRIPT LANGUAGE = "javascript"><!--

if (document.images) { // Active Images

img1on = new Image();
img1on.src = "walkb.jpg";

img1off = new Image();
img1off.src = "click.jpg";

// Function to 'activate' images.
function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");

// Function to 'deactivate' images.
function imgOff(imgName) {
if (document.images) {document[imgName].src = eval(imgName + "off.src");
// -->
</SCRIPT>

Thanks,
Jack

humpg

1:24 pm on Nov 15, 2004 (gmt 0)

10+ Year Member



What's the error you are receiveing and is this a problem in every browser?

smilinjack

1:37 pm on Nov 15, 2004 (gmt 0)

10+ Year Member



Thanks Hump,
It is just not working.
I copied the script from another page where it is working. The only difference is in the working one I have seven images and 12 in the falulty one.
Plus I altered the names of course.
Are you open to me Private mailing you the URLs

Thanks,
Jack

tedster

7:24 pm on Nov 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Jack, how about showing us the HTML code for just one of the links where this fails. Also, you may find this thread worth studying in your effort to debug things:

Bare Bones Rollover [webmasterworld.com]