Created
November 13, 2013 23:56
-
-
Save dhigginbotham/7458742 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#contact-send').click(function(){ | |
if($.browser.msie && window.XDomainRequest) { | |
// Use Microsoft XDR | |
var xdr = new XDomainRequest(); | |
xdr.open("POST", "functions/db-contact-xdr.php"); | |
xdr.send("&contact_name="+$('#contact-name').val()+"&contact_email="+$('#contact-email').val()+"&contact_subject="+$('#contact-subject').val()+"&contact_message="+$('#contact-message').val()+""); | |
xdr.onload = function () { | |
var dom = new ActiveXObject("Microsoft.XMLDOM"); | |
dom.async = false; | |
dom.loadXML(xdr.responseText); | |
$("mail",xdr.responseText).each(function(id) { | |
var mail = $("mail",xdr.responseText).get(id); | |
} | |
}); | |
}; | |
}else{ | |
$.post('functions/db-contact.php',{ | |
contact_name: $('#contact-name').val(), | |
contact_email: $('#contact-email').val(), | |
contact_subject: $('#contact-subject').val(), | |
contact_message: $('#contact-message').val() | |
},function(x){ | |
$("mail",x).each(function(id) { | |
var mail = $("mail",x).get(id); | |
} | |
}); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment