Once you add form elements, and if they are named, their value should be passed automatically via submission.
The best way to add form elements is via the DOM:
Code:
var newInput=document.createElement('input');
newInput.name='myNewInput'
document.forms.myform.appendChild(newInput);
As I'm not sure of all the specifics, here is a very basic working example:
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function add_input(){
var newInput=document.createElement('input');
newInput.name='myNewInput';
document.forms.myform.appendChild(newInput);
}
</script>
</head>
<body>
<form name="myform" action="#">
<input type="submit" value="submit">
<input type="text" name="art" onchange="add_input();">
</form>
</body>
</html>
Bookmarks