hi,
i have 20 madatory text boxes in one page.and i want to do validation using javascript.For that i am calling following function in button click.
But in this line i am not able to get the control
.
How can i do this??
any help??
Regards,
Veena
i have 20 madatory text boxes in one page.and i want to do validation using javascript.For that i am calling following function in button click.
Code:
function validate()
{
var obj1 = document.getElementById('<%=txtMovie.ClientID%>').id;
for(var i=1;i<20;i++)
{
var txtID = "obj" + i;
var txtBox= document.getElementById(txtID);
if(txtID.value.length == 0)
{
alert("something");;
return false;
}
}
}
Code:
document.getElementById(txtID)
How can i do this??
any help??
Regards,
Veena
Comment