DOM input does not show at $_POST
Posted: Tue Mar 20, 2007 8:01 am
feyd | Please use
First you click on the adcionar buttom so it makes 10 clones of the input field 'entrada'
If you press submit sefodeai.php would recive 11 inpui fields but only the first one shows.
Any help ??
Thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi there... Saw that another topic seed some thing about it but could not figure out how was it solved. So here goes my question:Code: Select all
<?php
echo "
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
<title>Documento sem título</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<META HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<META HTTP-EQUIV='Expires' CONTENT='-1'>
</head>
<body>
<form name='teste_form' method='post' id='teste_form' action='sefodeai.php'>
<input type='button' id='bt_adciona' value='Adcionar' onclick='addRowClone(\"tabela\")';
<br>
<table border='1' align='center' cols='1' name='tabela' id='tabela'>
<tbody id='corpo'>
<tr>
<td>
<input type='text' name='entrada' id='entrada'>
</td>
</tr>
</tbody>
</table>
<input type='submit' name='bt_submit'>
</form>
<SCRIPT language=javascript>
function addRowClone(tblId) {
var tblBody = document.getElementById(tblId).tBodies[0];
var newNode = tblBody.rows[0].cloneNode(true);
var qtd_atos = 10;
for(a=1; a<=qtd_atos; a++){
newNode = tblBody.rows[0].cloneNode(true);
tblBody.appendChild(newNode);
}
}
</SCRIPT>
</body>
</html>";
?>If you press submit sefodeai.php would recive 11 inpui fields but only the first one shows.
Any help ??
Thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]