|
-
Mar 21st, 2002, 06:06 PM
#1
Thread Starter
Fanatic Member
JavaScript and CSS Classes
Can you change with code the CSS class of an object after the web page has been downloaded? Does anybody know how?!
Thank you!
"The difference between mad and genius is the success"
-
Mar 21st, 2002, 06:09 PM
#2
Frenzied Member
You can in DOM 3. I'm not sure about the current standards.
www.w3c.org
developer.netscape.org
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Mar 21st, 2002, 06:12 PM
#3
Thread Starter
Fanatic Member
"The difference between mad and genius is the success"
-
Mar 22nd, 2002, 03:28 AM
#4
Fanatic Member
Its the Document Object Modal, a way of addressing an element/Tag on a HTML Page.
If you had this code...
<body>
<input type="text" name="text1">
</body>
... you can use the DOM and a scripting language such as Javascript to get the value in the text...
alert (document.all("text1").value);
...This would display a popup msg with the contents or text1.
document indicates the page your working on
all("text1") searching all elements on a page until it finds a item named 'text1'. all is only really used in Internet Explorer 4 +, I prefer getElementById but only modern browsers support it
value returns/sets the value of item
Check out CiberTHuGs link for more info
-
Mar 22nd, 2002, 12:14 PM
#5
Black Cat
Set the "className" attribute of an HTML element.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Mar 22nd, 2002, 03:24 PM
#6
Thread Starter
Fanatic Member
Thank you... the className works perfect!
"The difference between mad and genius is the success"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|