[Javascript] array elements question
Rochester, Dean
Dean.Rochester at ProMedica.org
Wed Mar 20 09:03:31 CST 2002
I have a form that has tabs, so it is actually 5 forms in one. I want to
check the values of the form elements of the current form before the
contents of the next tab are presented. I have tried making an array of
elements of the current forms elements, but it did not like that
if(lelemClass == "demo"){
var lelements = new Array();
lelements[0] = "Patient_First_Name";
lelements[1] = "Patient_Last_Name";
lelements[2] = "Sex";
lelements[3] = "Patient_DOB";
lelements[4] = "SSN";
lelements[5] = "Local_Area_Code";
lelements[6] = "Local_Number";
lelements[7] = "Work_Area_Code";
lelements[8] = "Work_Number";
}
if(lelemClass == "nok"){
var lelements = new Array();
lelements[0] = "PrimaryNOK_Area_Code";
lelements[1] = "PrimaryNOK_Local_Number";
lelements[2] = "Emergency_First_Name";
lelements[3] = "Emergency_Area_Code";
lelements[4] = "Emergency_Local_Number";
}
......
did not like the next line...
strEdit = document.mainform.lelements[intLoop].getAttribute('edit');
how can I do this?
Thanks in advance
Dean-O
More information about the Javascript
mailing list