tmp4

by Nik Gare <nik(at)cheddarcheese.de>

 Date:  Fri, 19 Oct 2001 17:05:00 +0200
 To:  <hwg-xml(at)hwg.org>
  todo: View Thread, Original
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