help, why does this code doesn't work on Mozilla Firefox??&l
|
| View previous topic :: View next topic |
| Author |
Message |
nebchill26
Joined: 26 May 2008 Posts: 2
|
Posted: Mon May 26, 2008 4:05 am Post subject: help, why does this code doesn't work on Mozilla Firefox??&l |
|
|
can anyone help me?i found this code on the internet im just a beginner just want to ask some one to help me make this code work on other browsers...it only works on I.E. 6, what i want is to make it work on Firefox and other browsers.. Here's the code
| Code: |
<html>
<head>
<title>Test Page</title>
<script language="JavaScript" type="text/javascript">
var textId = 2;
function addInput(tblId)
{
var tbl = document.getElementById(tblId);
var row = tbl.insertRow();
var cell = row.insertCell();
var input = document.createElement("<INPUT NAME=\"text" + textId + "\">");
var btn = document.createElement("INPUT");
btn.type = "button";
btn.value = "Delete";
btn.onclick = new Function("document.getElementById(\"" + tblId + "\").deleteRow(window.event.srcElement.parentElement.parentElement.rowIndex);");
cell.appendChild(input);
cell.innerHTML += " ";
cell.appendChild(btn);
textId++;
}
</script>
</head>
<body>
<form action="getvalues.php" method="POST">
<table id="tbl">
<tr>
<td>
<input type="text" id="text1" name="text1"> <input type="button" value="Add" onclick="addInput('tbl');">
</td>
</tr>
</table>
<input type="submit" value="Save">
</form>
</body>
</html>
|
[/quote] |
|
| Back to top |
|
 |
|
|
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|
|