Hey,
I have a form, and I'm working on validation, half way through the form, I have a <DIV> tag that contains the rest of the elements in the form, it seems I can access the elements before the <DIV> tag, but not after, after googling I've found the getelementbyID function, but not sure if it will do what I want. Picture something like this:
I have some javascript referring to the test element with no issues, but if I try to refer to test2, it doesn't work. How would I go about referring to test2 when it's within a DIV?
As you can tell, I'm very new to this.
Thanks.
I have a form, and I'm working on validation, half way through the form, I have a <DIV> tag that contains the rest of the elements in the form, it seems I can access the elements before the <DIV> tag, but not after, after googling I've found the getelementbyID function, but not sure if it will do what I want. Picture something like this:
Code:
<form> <input id="test" name="test"> <div id="myDiv"> <input id="test2" name="test2"> </div> </form>
As you can tell, I'm very new to this.
Thanks.
Comment