Forum Moderators: open

Message Too Old, No Replies

onmouseover - onmouseout

Validating XHTML strict

         

D_Blackwell

7:46 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have some graphic navigation buttons set up as rollovers. They won't validate for XHTML strict because I call them with name="xx". The name is being rejected, but if I switch to id="xx", the rollovers don't work. What to do?

As a side bar: Is there any preference either way for preloading all the images in the home page or linking to an external .js?

Purple Martin

10:32 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should use id. How are you referencing them? Are you using a combination of document.getElementById (most browsers) and document.all (IE4 and IE5)?

D_Blackwell

11:07 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<a href="gallery.html" onmouseover="document.gallery.src='images/btn-gallery-b.jpg'" onmouseout="document.gallery.src='images/btn-gallery.jpg'">
<img src="images/btn-gallery.jpg" name="gallery" class="link" style="width: 150px; height: 75px;"
alt="Navigation button for the gallery." title="" />
</a>

Looks like I'll be reading up on this. I won't be able to stand 3 lines of mark-up laughing at me. This owner is a JS fan. It'll be good for me.