I’m using this line of JS:
document.getElementById('nameDiv').innerHTML =
'<input type=\"text\" id=\"name\"/>';
to place a textbox in a div called ‘nameDiv’. When I hit submit on the form it doesn’t seem to pick up the contents of this JS generated text box.
Any ideas?
You must supply a
nameattribute to have it sent via the POST/GET (without JavaScripting around it, anyway).I used
some-namefor example here, you can use the most relevantname.Also, why are you escaping
"when your string delimiter is'and there will be no clash? I assume this is in a string somewhere.