I need to post data to another server using jquery.
Here is the code i am using
$.ajax({
url:"https://www.thewiseagent.com:443/secure/webcontactAllFields.asp",
type:'POST',
data:"ID=" + $ID
+ "&Source=" + $Source
+ "¬ifyCc=" + $notifyCc
+ "¬ifyBcc=" + $notifyBcc
+ "&noMail=" + $noMail
+ "&CFirst=" + $first
+ "&CLast=" + $last
+ "&Phone=" + $Phone
+ "&Fax=" + $Fax
+ "&CEmail=" + $CEmail
+ "&Message=" + $message,
success: function() {
//window.location.href = "http://www.petlooza.com";
}
});
i got error (302 object moved) in case of firefox/chorme although data is inserting.. but in case of IE data is not entering in external database. In IE i got a Access denied error.
Can anyone have alternative?
I have tried with json and jsonp still same error.
$.ajax({
type: "POST",
url: "https://www.thewiseagent.com:443/secure/webcontactAllFields.asp",
data: dataString,
dataType: "jsonp",
success: function(data) {
}
});
If you want to use $.ajax() and make a request to another domain you must set crossDomain option to true as stated in the documentation