javascript - send mail form not sending mail -


i have form pops when user clicks link , sends email address of choice. form looks great, email isn't getting sent...

<a href='#emailpopup' id='sendmessage'><img src="images/email.jpg"></a>      <div id="tellfriend" class="contact_form">       <a class="close" href="#close" >close</a>       <form id='tellafriend_form' method="post" action="http://naturesfootprintinc.com/sendmail.php">          <label for="name">your name: </label>         <input class="std_input" type="text" id="name" name="name" size="40" maxlength="35" value="" />          <label for="to">friend's email: </label>         <input class="std_input" type="text" id="to" name="to" size="40" maxlength="35" />          <label for="subject">subject: </label>         <input class="std_input" type="text" id="subject" name="subject" size="40" value="check out!!" />          <label for="message">message: </label>         <textarea id="message" name="message" readonly="readonly" rows="18" cols="40">custom message</textarea>          <input type="submit" name="submit" class="form_but" value="submit"/>       </form>      </div><!-- #tellfriend --> 

scripts used:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>  <script>  $(function() {     $('#tellfriend').hide();     $('#sendmessage').click(function(e) {         $("#tellfriend").fadetoggle('fast');     });  }); </script> 

sendmail.php:

<body>   <div id="thankyou">     <h1><strong>thanks sharing!</strong></h1>     <p><a href="http://homepage.com">back homepage</a></p>   </div> </body> 

yeah, i'm novice here. , patience.

you need server side code send mail. having form doesn't you

so send on click:

 $('#sendmessage').click(function(e) {     var $form = $('#tellafriend_form');     $.post($form.get(0).action, $form.serialize(), function(data){           //something on success     })     $("#tellfriend").fadetoggle('fast'); }); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -