Pages

Sunday, July 8, 2012

cross domain request using jquery

Unfortunatly cross domin access is not available to functions placed in other domain in a json file that return data.

One way out is to show the same in a .php file or an .asmx page but what if we want the interface to be platform independent...



The way out is to host JSON services using jsonp or "JSON with padding"



http://en.wikipedia.org/wiki/JSONP



To make a cross domain Json request use the following Jquery function



http://api.jquery.com/jQuery.ajax/

1 comment:

  1. If you have decided that you would like to use a jQuery plugin as a part of your website, you should consider many things before you choose one. If you do not take the time to plan the one that you would like to use before you start searching, you will find that you could end up wasting a lot of time going through all of the plugins that you do not want to use.

    jquery jobs

    ReplyDelete