Reputation: 1
I am trying to use jquery to grab the contents of a div and pass it to a php script that emails it. So I need to use a $('#div').html() and send that to a $_POST[''] value. Any ideas?
Upvotes: 0
Views: 70
Reputation: 1
Or you may also want to try this:
$.post('ajax/sendEmail.php', { body : $('#div').html() }, function(msg) { alert("Email was sent: " + msg); });
Upvotes: 0