Cannot access custom attributes in Firefox / Opera

  • Thread starter Thread starter cardalda
  • Start date Start date
C

cardalda

Hi all,
When I add custom attributes to a TextBox, I can read them out in
javascript under IE6.
For example:

in C#
TextBox1.Attributes.Add("MyString", "ABC");
TextBox1.Attributes.Add("TestMe(this)");

in Javascript I can do

function TestMe(editbox)
{
alert(editbox.MyString); // --> shows ABC
}

Under Firefox / Opera I get an "Undefined"

Does anybody know why this happens and can this be solved?

Thanks,
RRenzo.
 
Back
Top