View Single Post
  #1 (permalink)  
Old 01-22-2002, 11:12 PM
JackFlash JackFlash is offline
Registered User
 
Join Date: Jan 2002
Posts: 1
Talking DOM Rollovers Tutorial

Thanks for the tutorial, Chad. I have just derived considerable twisted pleasure from updating a piece of jscript I got from MSDN to make it a little more DOM compliant by using getElementById and setAttribute.

It still worked (in IE 5.0 SP2 even), so, emboldened, I gave it a face lift:

<SCRIPT type="text/ecmascript">

Do I get a free trip to Brussels?

Next, I went hog wild and put style info in a separate stylesheet:

<link href="myStyles.css" rel="stylesheet" type="text/css">

BUT, what about dynamically changing style properties, e.g.

if (myID.style.display == "none")
myID.style.display = "";

(I substituted "block" for "" and that worked OK)

Is there a DOM-compliant way of doing this, or is this still just for dirty, greasy MSIE monkies?

Cheers++

Jack

http://Jumpin.Jack.net
Reply With Quote