roll over images and the name attribute ( 5 Views )
-
i can't get any rollover image i create to validate because it does not reconise name. i've looked this up and found you suppose to replace this with id but this does not work. Also i have look over the internet to find many different javascript ways of doing this but most of them i can understand have the name attribute still
please can someone tell me is there any way to get rollover buttons to validate in xhtml strict???
thanks in advance
tyront
(caner, Bahamas)
If you want to use the name attribute, you'll have to use XHTML transitional. If you want to be strict, you can do something like this:
Code:
function changeImages(img, iSrc)
{
img.setAttribute("src", iSrc);
}
HTML Code:
<img id="image1" src="/img/myimage.gif"
onmouseover="changeImages(this, '/img/myroll.gif');"
onmouseout="changeImages(this, '/img/myimage.gif');" />
(eray, Trinidad and Tobago)
thanks alot for your help
(hakan, Sudan)
Related Topics ... (or search in 1.720.883 topics !)
need help with images and roll overs (4) alt attribute for switching images (3) netscape 6.2 woes (roll over images) (6) trying to get an alt attribute for images called with php (5) dreamweaver 4 prob. - white spaces between roll over images ie (3) roll up, roll up, get your divx certified device here today... (40) roll up! roll up! penny a go. all the fun of the fair. (34) are decorative images better as normal images or css background images on extra divs? (18) id attribute (5)
copyright © 2007-2031 Pfodere.COM ( 3 Pfoyihuee Online )
|