< form name=form1>
<%
int x = 0;
while ( x < 10)
{
%>
<label name="<%=x%>"> <input type=textbox name=inaki>
<br>
<%
x = x + 1;
}
%>
<input type=button value=go onclick="doit(this)">
</form>
<script>
function doit(sthg)
{
var x = 0;
while( x < 100)
{
alert(document.form1.inaki[x].value);
x = x+1;
}
}
</script>
Very simple code. I am doing 10 textboxes. And to access it am using document.form1.inaki[x].value.. i am accessing each textbox.
but how can i access the lable name for each texbox.