By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,566 Members | 1,730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,566 IT Pros & Developers. It's quick & easy.

How can I send an E-mail without using Document.Write(); I am using PHP, JS, & HTML

P: 1
Expand|Select|Wrap|Line Numbers
  1. <div>
  2.     <h3><a href="#">Water Falls</a></h3>
  3.     <div>
  4. <input type="checkbox" class="check" id="wf6" />WF-06
  5. <img src="images/WF6t.jpg"/>
  6. <input type="checkbox" class="check" id="wf7" />WF-07
  7. <img src="images/WF7.jpg"/></div></div>
  8. <input type="checkbox" class="check" id="wf6" />WF-06<img src="images/WF6t.jpg"/>    <br /><input type="checkbox" class="check" id="wf7" />WF-07    <div id="output"></div>
  9.     <div><input type="button" id="sub" value="Send Request" /></div>
  10.  
  11. if (document.getElementById("wf6").checked){
  12.   var wf6 = document.createTextNode("wf6; ");
  13.   document.getElementById("output").appendChild(wf6);
  14. }
  15. if (document.getElementById("wf7").checked){
  16.   var wf7 = document.createTextNode("wf7; ");
  17.   document.getElementById("output").appendChild(wf7);
  18.         }
  19. var out1 = document.getElementById("output").innerHTML;
  20.         $("#sub").click(function() {
  21.   document.write('<a href="mailto:rodney@rodneygarnett.com?subject=I would like a quote:&body='+ out1 +'">Please click me to send the request for a quote.</a><a href="quote.html">Back</a>');
  22.         })
  23.  
Mar 21 '12 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
send the mail data to PHP and let PHP compose the mail.

note: mailto requires a mail user agent to be installed on the client, which is often not the case (and unreliable as well, since the user is responsible for sending)
Mar 21 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.