php - How to send data to another server using jquery -
i need post data server using jquery.
here code 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 inserting.. in case of ie data not entering in external database. in ie got access denied error.
can have alternative?
i have tried json , jsonp still same error.
$.ajax({ type: "post", url: "https://www.thewiseagent.com:443/secure/webcontactallfields.asp", data: datastring, datatype: "jsonp", success: function(data) { } });
if want use $.ajax() , make request domain must set crossdomain option true stated in documentation
$.ajax({ url:"https://www.thewiseagent.com:443/secure/webcontactallfields.asp", type:'post', crossdomain: true, 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"; } });
Comments
Post a Comment