Please show me what you have and I can show you...
Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)
I've tried a few things but haven't had any luck, thanks for the quick response.
<script language="JavaScript">
//instantiate a global variable to hold the # of added controls
var numberOfAddedControls = 0;
function addTextBox(){
// increment number of added controls
numberOfAddedControls += 1;
var newBox = document.createElement("<input type='text' name='tbox" + numberOfAddedControls + "'>"
var newBreak = document.createElement("<br>"
document.body.insertBefore(newBox);
document.body.insertBefore(newBreak);
// check the name of added control
//alert(newBox.name);
<script language="JavaScript">
//instantiate a global variable to hold the # of added controls
var numberOfAddedControls = 0;
function addTextBox(){
// increment number of added controls
numberOfAddedControls ++
newTD = document.createElement("td"
newInput = document.createElement("input"
newInput.name = "tBox" + numberOfAddedControls
newTD.parentNode.appendChild(newTD)
newTD.innerHTML = "Label for input #" + numberOfAddedControls
newTD.appendChild(newInput)
}
</script>
Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.