J
John Walker
Hi,
I have two datagrids within one form and I need to do some client-side
validation on the second grid when the user changes the value in drop down
list which is a control in the second grid. For performance reasons I want
javascript to loop through only the second grid when the drop down list event
is fired, and in order to do this I had planned to put a hidden label between
the two datagrids and have javasript start looping within the form using the
hidden label as the starting point.
I know how to get the form element names from the index(see code below), but
need to know if I can get the element index from the element name. My plan
is to get the index value of the hidden label and start looping from there.
Please let me know if it is possible to get the index value from the element
name and also if this seems like an ok plan.
dml=document.Form1;
len = dml.elements.length;
var i = 0;
while(i < len)
{
alert(dml.elements.name);
i = i + 1;
}
Thanks, John
I have two datagrids within one form and I need to do some client-side
validation on the second grid when the user changes the value in drop down
list which is a control in the second grid. For performance reasons I want
javascript to loop through only the second grid when the drop down list event
is fired, and in order to do this I had planned to put a hidden label between
the two datagrids and have javasript start looping within the form using the
hidden label as the starting point.
I know how to get the form element names from the index(see code below), but
need to know if I can get the element index from the element name. My plan
is to get the index value of the hidden label and start looping from there.
Please let me know if it is possible to get the index value from the element
name and also if this seems like an ok plan.
dml=document.Form1;
len = dml.elements.length;
var i = 0;
while(i < len)
{
alert(dml.elements.name);
i = i + 1;
}
Thanks, John