0

I am currently working with a calculator that calculates price value and at the same time submit form fields to my email in one button click. Working in JavaScript/jQuery and HTML. Any other way than using mailto:?

Calculation already working with

go=$('button');

go.click(function(){

    //Bunch of code here

});

Got no clear solutions from researching through web so I tried to ask here.

myooomyoo
  • 135
  • 2
  • 5
  • 15
  • _"Any other way than using mailto:?"_ Yes, server-side code, such as PHP. [How to send an email using PHP?](http://stackoverflow.com/questions/5335273/how-to-send-an-email-using-php) – blex Mar 16 '15 at 13:02
  • You should do it on server side, for example with the PHP mail function. In this case, you could simply do an AJAX call to the corresponding file. You can't send a mail via pure JS, mailto is just a link like any a tag in your markup. – Balázs Varga Mar 16 '15 at 13:02
  • tried installing WAMP server already to make PHP server side scripting at ease.. but still doesn't work.. already configured the php.ini with the host which is in smtp.live.com for I am working with outlook email, also changed the outlook "to" email to my email address.. – myooomyoo Mar 17 '15 at 08:25

1 Answers1

1

try this...

$('button').click(function(){

    //Bunch of code here to calculate and assign to the html elements
    $('#formId').submit(); // code to submit form by using id or class

});
Sarath
  • 2,318
  • 1
  • 12
  • 24