Link to home
Start Free TrialLog in
Avatar of vidhubala
vidhubala

asked on

firefox add new row problem

Add new row fails in firefox. works in ie 6.
in firefox when i click on "add row"  it doesnt do anything.

pl help

here is the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!--
function addRow() {

      var x=document.getElementById('t1').insertRow();
      var col1=x.insertCell(0);
      var col2=x.insertCell(1);
      col1.innerHTML="232";
      col2.innerHTML="3232"

}
//-->
</SCRIPT>
 </HEAD>
 <BODY>
  <TABLE id="t1">
        <TR>
            <TD>1</TD>
            <TD>2</TD>
        </TR>
        <TR>
            <TD>11</TD>
            <TD>22</TD>
        </TR>
  </TABLE>
  <INPUT TYPE="button" value="add row" onclick="addRow()">
 </BODY>
</HTML>
Avatar of HonorGod
HonorGod
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of HonorGod
HonorGod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vidhubala
vidhubala

ASKER

works cool.. thanks.
You are very welcome.
Thanks for the grade & points.
Good luck