hwg-xml archives | Oct 2001 | new search | results | previous | next |
tmp4by Nik Gare <nik(at)cheddarcheese.de> |
|
Hi, Apologies if this has been asked before, but I have searched the archives and not come up with anything, or if this is the wrong list... I need to change a site from html4 transitional to xhtml (preferably strict, but any version is good), and have come up against a problem that is making my brain hurt, although the answer is probably really obvious. How do I make my Javascript rollovers xhtml complient? The Javascript code that I use ATM is somethig like this: <.head> <.script type="text/javascript" language="JavaScript"> <.!-- tools = new Image(); tools.src = "images/tools.gif"; toolson = new Image(); toolson.src = "images/tools_over.gif"; function imageChange(imageID,imageName){ document.images[imageID].src = eval(imageName + ".src"); } // --> <./script> <./head><.body> <.a href="tools.html" onMouseOver="imageChange('tools','toolson')" onMouseOut="imageChange('tools','tools')"> <.img src="images/tools.gif" name="tools"> <./a> ... Has anyone any suggestions on how I might sort the problem out? tia, Nik -- "Parsnips"
HWG hwg-xml mailing list archives, maintained by Webmasters