473,324 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

className

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.
Jul 13 '08 #1
3 1306
"Aaron Gray" <an********@gmail.comwrote in message
news:6d************@mid.individual.net...
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
Jul 13 '08 #2
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.

Jul 13 '08 #3
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
Jul 15 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Joshua Beall | last post by:
Hi All, I have been trying to dynamically call a static member function, as follows: $className = 'MyClass'; $methodName = 'MyMethod' $result = $className::$methodName(); However, I get a...
1
by: Peter King | last post by:
if you assign multiple classes in order to keep your classes generic e.g ..classA { position.absolute; left:5 top:5 height:200 width:800 } ..classB { background-color: red} ..classC {...
4
by: Ben R. | last post by:
Between ClassName and Inherits, which attribute is set to specify the class that a page uses? I would think that would be inherits. Further, the description for ClassName is: Specifies the class...
2
by: bmgz | last post by:
I have written a script that highlights a table row when the appropriate checkbox is checked. Using element.style is a bit messy and doesn't really fulfil my needs.. I want to just be able to...
4
by: Ben R. | last post by:
Between ClassName and Inherits, which attribute is set to specify the class that a page uses? I would think that would be inherits. Further, the description for ClassName is: Specifies the class...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.