Re: tmp4

by "Darrell King" <darrell(at)webctr.com>

 Date:  Fri, 19 Oct 2001 14:25:33 -0400
 To:  <hwg-xml(at)hwg.org>
 References:  cheddarcheese
  todo: View Thread, Original
Remove them to an external JS filem, and access them with a link in the
document's HEAD section:

<.script type="text/javascript" src="path/to/external_file.js"><./script>

----- Original Message -----
From: "Nik Gare" <nik(at)cheddarcheese.de>
To: <hwg-xml(at)hwg.org>
Sent: Friday, October 19, 2001 11:05 AM
Subject: tmp4


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