Hi guys,
Once again, I'm having problems with javascript in IE.
I can't make the following code working in IE like it works in Firefox.
Code:
var args = document.getElementsByTagName('input');
for (var i=0; i<args.length; i++)
{
if (args[i].getAttribute('type') == 'text')
{
args[i].setAttribute('class', 'blurControl');
args[i].onfocus = function()
{
this.setAttribute('class', 'focusControl');
}
args[i].onblur = function()
{
this.setAttribute('class', 'blurControl');
}
}
}
Any suggestions please?
Thanks
Aleksandar Dragosavac
Belgrade, Serbia