Hi,
I have a drop down
when a user selects a number from the drop down he sees those many textboxes with first name and last name
so if he selects 2 in the drop down then he sees 2 textboxes for first name and 2 textboxes for last name
so right now i am doing validation to see if he entered any values in the first name textboxes
if he didnt then fire an alert if he did then submit the form
i have this code but it doesnt work as my first name textboxes are blank can someone tell me what i am doing wrong
todd
function checkval()
{
var getncounting=document.frm1.nocount.value;
alert(getncounting);
for(i=0; i < getncounting; i++)
{
alert(i);
var myElem = document.getElementById("txtfirstname" + i);
if(myElem=="")
{
alert("enter something");
}
}