Dear Friends,
we are facing a problem with alt attribute in Java script.While retrieving alt attribute in IE its working fine but in FireFox we are getting as undefined.Please give solution for retrieving the alt attribute in firefox.
please find the below code for how i am retrieving...
<html>
<head>
<script type="text/javascript">
window.onload = function()
{
var els= document.forms[0].elements;
var compcode ="";
for(var i= 0; i < els.length; i++)
{
if (els[i].id!="")
{
alert(els[i].id);
alert(els[i].title);
alert(els[i].alt);
}
}
}
</script>
</head>
<form action="#">
<select name="test" id="testing" alt="test|001" title="test|ddd">
</select>
</form>
</html>
The above code is working fine in IE but not in firefox
Cheers
Siva kumar