It is possible to send POST data from JQUery to server, located in another domain? Google says that it impossible (Jquery.ajax() can send data only through GET method, not POST), but may be in new versions of Jquery it become possible?
Asked
Active
Viewed 4,393 times
3 Answers
1
You can use jQuery ajax call to do a post from a different domain if you set crossDomain option to true, by default is set to false.
Check http://api.jquery.com/jQuery.ajax/ for crossDomain option.

Carlos
- 480
- 1
- 5
- 10
-
I just wanted to mention, I am able to successfully send POST via jquery .ajax without setting the crossDomain option to true. Although everything posts correctly, ajax still invokes an error code for some reason. This lead me to find the crossDomain option, but setting that to true did not resolve the issue for me. – Damainman Sep 12 '13 at 14:55
1
And to answer the question you cannot access cross domain sites throw AJAX.
The reason why you can throw GET method is that you create an script tag (jsonp).

Muhammad Usman
- 12,439
- 6
- 36
- 59

Andreas Louv
- 46,145
- 13
- 104
- 123
-1
Something like this
$.ajax({
type: "POST",
url: "http://someurl.com/",
dataType: "jsonp",
success: function(data){
}
});

Oleksandr Fentsyk
- 5,256
- 5
- 34
- 41