Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > className

Reply
Thread Tools

className

 
 
Aaron Gray
Guest
Posts: n/a
 
      07-13-2008
Okay, onto className and the HTML class attribute.

When was className introduced, I believe it was introduced by Microsoft,
although I could be wrong. Now I also believe that Mozilla added support for
'className' at some point in Geko's life time, but when ?

Now the really horribly funny thing is when using getAttribute() and friends
IE only works with 'className' where as FF only works with 'class'. Funny
funny behaviour, I don't say.

Anyone educate me thurther with some details ?

Many thanks in advance,

Aaron

P.S. I could not find anything in the FAQ or any other good standard
informative source, but I maybe wrong.


 
Reply With Quote
 
 
 
 
Aaron Gray
Guest
Posts: n/a
 
      07-13-2008
"Aaron Gray" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Okay, onto className and the HTML class attribute.
>
> When was className introduced, I believe it was introduced by Microsoft,
> although I could be wrong. Now I also believe that Mozilla added support
> for 'className' at some point in Geko's life time, but when ?


Woopse its a W3C DOM construct !

> Anyone educate me thurther with some details ?


Anyone know with which browsers Geko and IE introduced it ?

I am wondering if we have to use get/setAttribute() with older browsers at
all ?

Does the behaviour need lifting, or can we just use the className object
attribute for all baseline browsers ? By baseline I mean all browsers
supporting Javascript 1.5/ ECMAScript 3/ JScript 5.5 ?

Aaron


 
Reply With Quote
 
 
 
 
Richard Cornford
Guest
Posts: n/a
 
      07-13-2008
Aaron Gray wrote:
> Okay, onto className and the HTML class attribute.
>
> When was className introduced, I believe it was introduced by
> Microsoft, although I could be wrong.


IE 4 had calssName properties on its elements, Netscape 4 did not. I
have never seen and IE 3 in the flesh so I don't know anything about its
object model (and couldn't care less at this point).

> Now I also believe that Mozilla added support for 'className' at some
> point in Geko's life time, but when ?


Pre-release Mozzlia browsers had className properties on its elements
(including at least 0.9 to my certain knowledge), as did Netscape 6
browsers. (there were no Netscape 5 browsers)

<snip>
> P.S. I could not find anything in the FAQ or any other good
> standard informative source, but I maybe wrong.


The HTML DOM is the only standard relevant to className properties.

Richard.

 
Reply With Quote
 
webbugtrack@gmail.com
Guest
Posts: n/a
 
      07-15-2008
Until IE8 (in Beta) IE will not handle getting/setting the class
attribute using the DOM methods getAttribute() and setAttribute().

Then again, 'class' is merely one of dozens of attributes that fail to
work properly in IE.

Check the known issues with setting (and getting) IE attributes here:
http://webbugtrack.blogspot.com/2007...ways-work.html

Regards,
Max
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS: "tagname.classname" or ".classname" Ante Perkovic Javascript 2 12-25-2003 03:02 AM
Is `new classname' the same as `new classname()' ? Hongzheng Wang C++ 32 12-05-2003 05:29 PM
classname::classname a type ? Oliver S. C++ 1 09-11-2003 07:47 PM
global.asax classname noname ASP .Net 1 07-16-2003 07:28 PM
className Attribute (UserControls) Charles A. Lackman ASP .Net 0 07-08-2003 09:48 PM



Advertisments