I created dynamic Textboxes using javascript in JSP.But i want to give every textbox a unique name..But I dont know how to give unique name to all the textbox which are created dynamically.....Can u help me Please.............
<script code="text/javascript">
function dynam(val)
{
var d= document.getElementById("Bottom");
d.innerHTML='<table>';
for(i=1;i<=val;i++)
{
d.innerHTML += '<tr><td>Parameter</td><td><INPUT type="text" name="week"'+i+'size = 15></td>';
}
d.innerHTML +='</table>' ;
}
</script>
in the above code."val" is the integer value passed while calling this function. "Bottom" is the id of <DIV> tag in my JSP page.
My problem is : when i creating a text box. the Unique name of the textbox in not getting generated.All the text bok has the same name as "week",but i want the name to be as week1,week2,week3,.....etc
Edited by: AnilTcs on Jan 21, 2009 1:31 AM