Hello im new to this forum so i appologise if this post is in the wrong place, i have been spending many hours trying to get some javascript working on the ez pages and trolling this forum i have found that i needed the jscript_(filename).js to be included in /includes/templates/YOUR_template/jscript file to be called before the </head>
but now i need to add some script after a form element in the body section.
when i try and run this the script it does not seem to be getting executed.Code:<form id="myform" action="new_account_online.php"> <table border="0"> <tbody> <tr> <td colspan="2"><strong>Invoice Details</strong></td> </tr> <tr> <td>Full Name:<span style="color: #ff0000;">*</span></td> <td><input id="full_name" name="full_name" type="text" /></td> </tr> //code removed to save space <tr> <td>Please confirm you agree to the terms and conditions<span style="color: #ff0000;">*</span></td> <td><input id="confirm_tc" name="confirm_tc" type="checkbox" /></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" name="submit" /><A href="javascript: submitform()">Submit</A></td> </tr> </tbody> </table> </form> <!-- validation script --> <script type="text/javascript"> var frmvalidator = new Validator("myform"); frmvalidator.addValidation("full_name","req","Please enter your Name"); frmvalidator.addValidation("T_A_L1","req", "Please enter the first line of your address"); frmvalidator.addValidation("T_A_postcode","req","Please enter your postcode"); frmvalidator.addValidation("T_A_email","req","Please enter your Email address"); frmvalidator.addValidation("T_A_email","email"); frmvalidator.addValidation("T_A_phone","req","Please enter your phone number"); frmvalidator.addValidation("T_A_phone","maxlen=50"); frmvalidator.addValidation("T_A_phone","numeric"); frmvalidator.addValidation("cust_class","dontselect="ps"); frmvalidator.addValidation("confirm_tc","shouldselchk=on","Please confirm the Terms & Conditions"); </script> <!-- end validation script --> <!-- submit script --> <script type="text/javascript"> function submitform() { if(document.myform.onsubmit()) { document.myform.submit(); } } </script> <!-- end submit script -->
do i need to add the script into another .js file and call it within the ez pages or something like that?
regards
thanks in advance as this is really driving me crazy


Reply With Quote

