I got the following HTML: <form id="form1" action="" method="post" class="validate"> <table> <tr> <td><label for="name" id="label_name">Naam</label></td> <td><input type="text" id="name" name="name" class="required"/></ td> </tr> <tr> <td><label for="email" id="label_email">Email</label></td> <td><input type="text" id="email" name="email" class="required"/></ td> </tr> <tr> <td valign="top"><label for="message" id="label_message">Bericht</ label></td> <td><textarea id="message" name="message" rows="4" cols="20"></ textarea></td> </tr> <tr> <td colspan="2" align="right"><input type="submit"/></td> </tr> </table> </form>
And the following JavaScript: function findForms() { var forms = document.getElementsByClassName('validate'); // alert returns [object HTMLCollection] alert(forms); // this isn't working: for(var i = 0; i < forms.length; i++) alert(forms[i].id); // this isn't working: forms.each(function(form) { alert(form.id) } ) } document.onload = findForms(); What is going wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---