How to use non-standard attributes in a tag?

F

F. Da Costa

Hi,

Is it possible to get Gecko to react to the following tag in the same way
that IE5+ does? (ie.show the value of the row attribute rather than
'undefined')

<a onclick="alert(this+' ~~ '+this.row);" row="1" />

Or is Gecko doing the right thing and IE5+ *not* conforming to standard
(again)?

In short: is there a way to get this to work properly?

TIA,
Fermin DCG
 
L

Leif K-Brooks

F. Da Costa said:
Is it possible to get Gecko to react to the following tag in the same
way that IE5+ does? (ie.show the value of the row attribute rather than
'undefined')

<a onclick="alert(this+' ~~ '+this.row);" row="1" />

<a onclick="alert(this+' ~~ '+this.getAttribute('row'));" row="1" />

But you should probably be using your own XML namespace.
 
F

F. Da Costa

Leif said:
<a onclick="alert(this+' ~~ '+this.getAttribute('row'));" row="1" />
Thx for the reply (overlooked that possibility).
But you should probably be using your own XML namespace.
If and when there were more of these things going on i'd agree. However,
this is most likely the only one so i'll leave that can of worms closed
(for now) ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top