Hello All,
I need some help to add 'onkeypress' event attribute to HTML <INPUT>
elements.
Below code works fine in Firefox, but not at all in IE 7.
var inputs = document.getElementsByTagName("input");
for (i = 0; i < inputs.length; i++ )
{
if(inputs[i].type == 'text'') {
alert('name is-->>>'+inputs[i].name);
inputs[i].setAttribute("onkeypress", "javascript:return
test()");
}
}
Tried writeAttribute() in prototype 1.6.0.2 too but no use in IE 7.
Thanks,
Kcnu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---