html - Javascript contact form doesn't execute/send email -


<script type="text/javascript">          function validateform() {              var inputbericht = document.forms["formulier"]["bericht"].value;              var inputmail = document.forms["formulier"]["mail"].value;              var inputvoornaam = document.forms["formulier"]["voornaam"].value;              if (inputvoornaam == null || inputvoornaam == "") {                  alert("naam moet worden ingevuld!");                  return false;              }              if (inputmail == null || inputmail == "") {                  alert("e-mailadres moet worden ingevuld!");                  return false;              }              if (inputbericht == null || inputbericht == "") {                  alert("een bericht moet worden ingevuld!");                  return false;              }          }              </script>
<form action="mailto:myemail" method="post" name="formulier" onsubmit=" return validateform()">            <p>naam: <input type="text" name="voornaam"></p>          <p>e-mailadres:  <input type="text" name="mail"></p>          <p>bericht: <br><br><textarea name="bericht" rows="5" cols="110"></textarea></p>          <p><input type="submit" name="submit" value="verzenden"></p>          <br>      </form>

i've changed email myemail censor email adres. when filling in form , clicking on submit, don't receive email. seems isn't executed right, think should add submit button, i'm not quite sure , why.

afaik approach won't work. need send submitted data script of sort send using mail protocol.

if wan't use full javascript solution there's mandrill. if you're using php, , server supports it, might use mail() function.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -