Go Back   HTMLCenter Web Development Forums > Web Design and Development > Programming and Scripting

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 01-22-2002, 11:12 PM
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

  #2 (permalink)  
Old 01-23-2002, 12:37 PM
Registered User
 
Join Date: Jan 2002
Posts: 7
Hi Jack..

The display "none" and " " should work cross-browser. You can also substitute block with "inline" if you don't want to invoke the CSS box model. Of course with regard to elements you can also use
"visibility:visible" or "visibility:hidden" in
your style sheet, or hard coded into the html tag itself. (eg)

<p style="position:absolute;visibility:hidden;"
</p>

here
is the W3c display link..

Good coding!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -5. The time now is 08:44 PM.

 
KickApps
Clicky Web Analytics


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter