Asked By mostafa hamdy
17-Aug-06 08:03 AM
hi all
I have web page which contains table with ans I set for each row in the table Name and Id attributes,and when I try to access soecific row in the table by name it works very fine with IE but it makes problems with firefox and it display in the alert undefined: the code is listed below
-------------HTML code-----------------------
<table width="50%" bgcolor="#000000">
<tr id="tr1" name="firsttr"><td></td></tr>
<tr id="tr2" name="secondtr"><td></td></tr>
<tr id="tr3" name="thirdtr"><td></td></tr>
</table>
------------------------JS code---------------------------
function myFunction()
{
var trname = document.getElementByid('tr1').name ;
alert(trname);
}
plz if any body can help me in solving this problem plz send me
bets regards
Mostafa