www.webdeveloper.com
Results 1 to 5 of 5

Thread: Ajax -cross domain POST call with Jquery

  1. #1
    Join Date
    Feb 2006
    Posts
    42

    Ajax -cross domain POST call with Jquery

    Hi,
    Am new to world of jquery..and in our appln we need to use jquery for making a cross domain call
    and sending parameters through a post method.

    Is this possible through jquery?

    Whatever so far , i could come up works on FF/Chrome higher versions..but not on IE/Safari.

    Even on FF/Chrome...per the firebug the status says as cancelled but am seeing the requests reaching the server.

    Can anyone guide me..if this can be done through Jquery. If not whats the alternative

    Regards

  2. #2
    Join Date
    Apr 2013
    Location
    Bournemouth, UK
    Posts
    15
    Yep, it is possible, just install the plugin from here, and your ajax queries will become crossdomain
    XDomainAjax: https://github.com/padolsey/jQuery-P...ss-domain-ajax

  3. #3
    Join Date
    Feb 2006
    Posts
    42
    Thanks!! but this plugin refers to GET method call

    And my requirement is for POST...

  4. #4
    Join Date
    Apr 2013
    Location
    Bournemouth, UK
    Posts
    15
    Hm, you are right, stackoverflow has some information about it, hope it helps http://stackoverflow.com/questions/2...via-javascript

  5. #5
    Join Date
    Feb 2006
    Posts
    42
    Tried this..and this works on FF and Chrome..not on IE..though call goes to the function.Any pointers?

    Code:
        		function(url, requestData) {		
    			
    			var jqryXHR = $.ajax({
    				type : 'POST',				
    				url : anotherDomainurl,
    				dataType : 'jsonp',
    				contentType : 'application/json; charset=UTF-8',
    				data : {
    					requestParams : requestData
    				}
    			});
    			}

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles