hey,
can some one help me with cloning the parts of HTML for the form generation?
I want to add the lines of the form if the button is pressed, but then if I need I can press another button to remove last line(s) if needed.
So far I have this, but it shows only one line and no more. On another trerat I was sudjested to use Child cloaning but it seams not to be working with elements such as <select>… Dont know Im lost, and goinmg crazy, pls help!
Thanks!
[code=php]
<html>
<head>
<title>New Page 3</title>
<script language=javascript>
i=0;
function action(){
i++;
locDiv.innerHTML=”<input type=text name=income_name”+ i +” size=20><select size=1 name=income_type”+ i +”><option selected value=Salary>Salary</option><option value=Rental Income>Rental Income</option><option>Social Security</option><option value=Pension>Pension</option></select><input type=text name=value”+ i +” size=20><input type=text name=who”+ i +” size=20><br>”;
}
</script>
</head>
<body>
<div id=locDiv>
</div>
<input type=”button” value=”Action” name=”Action” onclick=action();>
</body>
</html>
?