JavaScript does not work even when subject: config | javascriptenabled is checked to make sure that this option is enabled.

I looked more similar to this proceeding issues and they are just too complex to be right.

Chrome displays this simple code:

<body >
 <h1>Simple Hover</h1>
 <img id="home" name="img_home" src="hover/home_default.png" alt="Home" onmouseover="window.document.img_home.src = 'home_over.png'" onmouseout="window.document.img_home.src='home_default.png'" />
</body>

Firefox doesn't. Verified javascript is enabled and it is.

This is for a class of autonomous rhythm is not emergency... but... assuming it was my code I deleted all my courses involving the hover and restarted, only to find the error continues and THEN I tried Chrome, LOL.

I'm on version 38.0.5 on Windows 7. In simple terms, how to fix this?

Thank you

Mike

Edit: tried to fix style - that didn't work. for the code example, see https://pastebin.mozilla.org/8838794 (philipp)

I don't think you can use window.document.img_home.src to set the attribute of the source of an image.
In Firefox, you will need to use document.getElementById, or one of the other functions possible getElement (s).

As you are referring to the element current, easier is to use this "selector.

 <img id="home" name="img_home" src="hover/home_default.png" alt="Home" onmouseover="this.src = 'home_over.png'" onmouseout="this.src='home_default.png'" />

Tags: Firefox

Similar Questions

Maybe you are looking for

  • Unable to connect using Face Time after updating iOS 9.3

    Unable to connect using Face Time after updating iOS 9.3

  • Keychain keeps asking for password when I start?

    Every time I start my computer takes the Keychain password about 10 times! This happened after I changed my password to iCloud. I have experienced similar issues in other forums, it seems that El Capitan has no Keychain first aid? How to stop guests

  • reinstalling xp windows Samsung n130

    I had a virus on my computer decided to reformat my hard drive. I'm not adept with computers and accidentally delete all partitions, including the recovery section. I thought that I copy of Windows XP is on the samsung recovery disk, but this is just

  • My inverter display goes

    Hi HP I have a laptop HP DV3507ea of February 2009, he's always hard going with Windows 7 Home Premium 64 - bit & a backlit keyboard. In any case, I have a problem of teething & random. The backlight of the lcd screen turns off randomly, but not all

  • Impossible to install quicktime or itunes

    I can not install quicktime or itunes on windows vista 32 bit. Not repeat myself a valid win32 applicationtried uninstall quicktime and install a new version, but does not work