I asked this question already, but I am not sure why it has been moved to the javascript forum? ARe you telling me that this cannot be done using php?
Thanks.
Thanks.
function createTextBoxes()
{
var boxes = document.getElementById('totBoxes');
var noBoxes = boxes.value;
var mydiv = document.getElementById("boxes");
var newHTML = '<br>Enter the data<table border="1" cellspacing="10">';
newHTML += '<tr><th>Data</th></tr>';
//Create textboxes
for(var r=0;r<noBoxes;r++)
{
newHTML += '<tr>';
//alert('here');
var box = 'name="box' + r +'"';
newHTML += '<td>';
newHTML += '<input type="text"'+ box +'/>';
newHTML += '</td></tr>';
}
newHTML += '</table>';
mydiv.innerHTML = newHTML;
}
Comment