Welcome Guest, Not a member yet? Register   Sign In
Jquery ajax success function returns null?
#21

[eluser]explorercode[/eluser]
I am violating the SOPolicy.. my js (domain1) is in one server and the RESTful api is in another.. (domain2). Your explanation on the SOP makes sense. I appreciate your help. Now, I am attempting to use JSONP instead of a proxy class to solve this issue. Any tips?
#22

[eluser]BrianJM[/eluser]
[quote author="explorercode" date="1296186091"]I am violating the SOPolicy.. my js (domain1) is in one server and the RESTful api is in another.. (domain2). Your explanation on the SOP makes sense. I appreciate your help. Now, I am attempting to use JSONP instead of a proxy class to solve this issue. Any tips?[/quote]

You can do this in the latest jQuery 1.5rc1 source (see http_:_//_bugs.jquery.com/ticket/4897).

Example provided here: http_:_//_brianjm.com/explorercode/jsonp.html

EDIT: If you don't want to use the jQuery 1.5rc1 release, you may want to consider using the proxy.php file discussed earlier or a jQuery JSONP plugin.
#23

[eluser]explorercode[/eluser]
Thanks! It worked. I will look more into the jQuery REST-STYLE JSONP CALLBACK OPTION.. thanks for you help!
#24

[eluser]BrianJM[/eluser]
No problem. Glad you got it worked out!




Theme © iAndrew 2016 - Forum software by © MyBB