Is it possible to scan through HTML using a javascript function to find a specific class tag, then focus on the next occurrence of a textbox/checkboc/radiobutton/textarea after that class tag?
For example, I have the following code:
[code=html]<p>Field One : <span class=”required”><input type=”text” name=”myfield” size=”10″ maxlength=”20″ /></span></p>
Using a JavaScript function, I want to search through the HTML code for the class ‘required’. Once I find that tag, I want to move forward to text field in order to validate that it is not blank. Is it possible to do this? If so, a nudge in the right direction would be appreciated. Thanks!