Hi, thank you for looking at this post.
I am trying to make my form validation more dynamic, I have never tried to take elements from one array befor and place them in another to be read back to the browser. I am still kinda new to this although I do have an ok grasp on php still noobie at that to I guess, I have seen a similiar thing accomplished in php, however I would like to accomplish my form validation on client side (the way it should be).
2. var Element=new Array("mytext","mytext1","mytext2");
3. var BadData=new Array();
4. var i=0;
5. var v=0;
6. while (i<=2)
7. {
8. var myTextField = document.getElementById("Element");
9. if (myTextField.value.length == 0)
10. {
11. BadData[v]=Ellement;
12. i++;
13. v++;
14. }
15. else
16. {
17. i++;
18. }
19. }
The problem is on line 9 char 2 I keep getting an error of object required. Im kinda stuck on this any help would be appriciated. Please let me know if I have not givenen enough information.
I am trying to make my form validation more dynamic, I have never tried to take elements from one array befor and place them in another to be read back to the browser. I am still kinda new to this although I do have an ok grasp on php still noobie at that to I guess, I have seen a similiar thing accomplished in php, however I would like to accomplish my form validation on client side (the way it should be).
2. var Element=new Array("mytext","mytext1","mytext2");
3. var BadData=new Array();
4. var i=0;
5. var v=0;
6. while (i<=2)
7. {
8. var myTextField = document.getElementById("Element");
9. if (myTextField.value.length == 0)
10. {
11. BadData[v]=Ellement;
12. i++;
13. v++;
14. }
15. else
16. {
17. i++;
18. }
19. }
The problem is on line 9 char 2 I keep getting an error of object required. Im kinda stuck on this any help would be appriciated. Please let me know if I have not givenen enough information.