How do I make my JavaScript email a form? -
i working on 'contact form', have been working on quite while but, can't figure out how make javascript email form email adress.
this code :
<form id="myform" action="mailto:contact@anika.nl"> <label for="firstname">name:</label> <input id="firstname" name="firstname" type="text" /> <label for="email">email:</label> <input id="email" name="email" type="text" /> <label for="message">message:</label> <textarea id="message" cols="20" name="address" rows="5"></textarea> <input name="submit" type="submit" value="submit" /> </form> <script type="text/javascript">// <![cdata[ var frmvalidator = new validator("myform"); frmvalidator.addvalidation("firstname","req","please enter first name"); frmvalidator.addvalidation("firstname","maxlen=20", "max length firstname 20"); frmvalidator.addvalidation("email","maxlen=50"); frmvalidator.addvalidation("email","req"); frmvalidator.addvalidation("email","email"); // ]]></script>
does see i'm doing wrong/what's missing?
Comments
Post a Comment