Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript onmouseover not working with doctype in firefox?
    text
    copied!<p>I am using the JavaScript onmouseover event for the menu on my website, but it does not work in firefox when I declare a doctype. And if i don't declare a doctype IE displays the page wrong. Here is the method that I used.</p> <pre><code>loadImage1 = new Image(); loadImage1.src = "http://broken.gif"; staticImage1 = new Image(); staticImage1.src = "http://broken.gif"; loadImage2 = new Image(); loadImage2.src = "http://broken.gif"; staticImage2 = new Image(); staticImage2.src = "http://broken.gif"; loadImage3 = new Image(); loadImage3.src = "http://broken.gif"; staticImage3 = new Image(); staticImage3.src = "http://broken.gif"; function showa() { image1.src=loadImage1.src; } function hidea() { image1.src=staticImage1.src; } function showb() { image2.src=loadImage2.src; } function hideb() { image2.src=staticImage2.src; } function showc() { image3.src=loadImage3.src; } function hidec() { image3.src=staticImage3.src; } </code></pre> <p>And in the body:</p> <pre><code> &lt;a href="http://broken.html" onMouseOver="showa()" onmouseout="hidea()"&gt; &lt;img name="image1" src="http://broken.gif" alt="Browse" width="193" height="47" border="0" /&gt; &lt;/a&gt; &lt;a href="http://broken.html" onmouseover="showb()" onmouseout="hideb()"&gt; &lt;img name="image2" src="http://broken.gif" width="193" height="47" alt="Make a List" border="0" /&gt; &lt;/a&gt; &lt;a href="http://broken.html" onmouseover="showc()" onmouseout="hidec()"&gt; &lt;img name="image3" src="http://broken.gif" width="193" height="47" alt="Requests" border="0" /&gt; &lt;/a&gt; &lt;/div&gt; &lt;div id="searchbar"&gt; &lt;img src="..broken.gif" width="222" height="41" /&gt; &lt;img src="..broken.gif" width="108" height="41" alt="Search" /&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload