mirror of
https://github.com/seigler/dash-website
synced 2025-07-28 15:36:09 +00:00
hooking up the contact form, need to fininsh ajax request
This commit is contained in:
parent
9df146815b
commit
67c8d7923e
2 changed files with 47 additions and 6 deletions
37
src/js/contact.js
Executable file
37
src/js/contact.js
Executable file
|
@ -0,0 +1,37 @@
|
|||
;(function ($) {
|
||||
'use strict';
|
||||
$(document).ready(function () {
|
||||
$('.reset').on('click',function () {
|
||||
var name = $('#contact_name').val();
|
||||
var email = $('#contact_email').val();
|
||||
var category = $('#contact_category').val();
|
||||
var message = $('#contact_message').val();
|
||||
// $.ajax({
|
||||
// type: 'POST',
|
||||
// url: 'https://mandrillapp.com/api/1.0/messages/send.json',
|
||||
// data: {
|
||||
// 'key': 'YOUR API KEY HERE',
|
||||
// 'message': {
|
||||
// 'from_email': 'YOUR@EMAIL.HERE',
|
||||
// 'to': [
|
||||
// {
|
||||
// 'email': 'RECIPIENT@EMAIL.HERE',
|
||||
// 'name': 'RECIPIENT NAME (OPTIONAL)',
|
||||
// 'type': 'to'
|
||||
// }
|
||||
// ],
|
||||
// 'autotext': 'true',
|
||||
// 'subject': 'YOUR SUBJECT HERE!',
|
||||
// 'html': 'YOUR EMAIL CONTENT HERE! YOU CAN USE HTML!'
|
||||
// }
|
||||
// }
|
||||
// }).done(function(response) {
|
||||
// console.log(response); // if you're into that sorta thing
|
||||
// });
|
||||
console.log(name,email,category,message);
|
||||
$(this).closest('form').find('input[type=text], textarea').val('');
|
||||
});
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue