A
Amit Maheshwari
I have my aspx page on which i am creating <input type=text> on client side
using javascript. Now when i submit my page i need to access these controls
to get the value entered by the user.
the code is like
<script language="javascript">
<!--
//to count no of file upload controls
var intRowCount = 2;
function AddApp()
{
var strInner='';
var objTBody = document.getElementById('AppBody');
//creating columns
var objCell1 = document.createElement("TD");
var objCell2 = document.createElement("TD");
var objCell3 = document.createElement("TD");
//creating row
var objCurRow = document.createElement("TR");
objCurRow.appendChild(objCell1);
strInner = "<input type='text' id='App" + intRowCount +"' >";
objCell2.innerHTML = strInner;
//appending columns in the row
objCurRow.appendChild(objCell2);
strInner = "<input type='text' id='Desc" + intRowCount +"' >";
objCell3.innerHTML = strInner;
//appending columns in the row
objCurRow.appendChild(objCell3);
objCurRow.setAttribute("id","tr"+intRowCount);
//appending row in the TBody
objTBody.appendChild(objCurRow)
intRowCount = parseInt(intRowCount, 10) + 1;
}
-->
</script>
<input type="button" id="AddAppl" value="Add Application"
onclick="AddApp();">
using javascript. Now when i submit my page i need to access these controls
to get the value entered by the user.
the code is like
<script language="javascript">
<!--
//to count no of file upload controls
var intRowCount = 2;
function AddApp()
{
var strInner='';
var objTBody = document.getElementById('AppBody');
//creating columns
var objCell1 = document.createElement("TD");
var objCell2 = document.createElement("TD");
var objCell3 = document.createElement("TD");
//creating row
var objCurRow = document.createElement("TR");
objCurRow.appendChild(objCell1);
strInner = "<input type='text' id='App" + intRowCount +"' >";
objCell2.innerHTML = strInner;
//appending columns in the row
objCurRow.appendChild(objCell2);
strInner = "<input type='text' id='Desc" + intRowCount +"' >";
objCell3.innerHTML = strInner;
//appending columns in the row
objCurRow.appendChild(objCell3);
objCurRow.setAttribute("id","tr"+intRowCount);
//appending row in the TBody
objTBody.appendChild(objCurRow)
intRowCount = parseInt(intRowCount, 10) + 1;
}
-->
</script>
<input type="button" id="AddAppl" value="Add Application"
onclick="AddApp();">