how to implement cross domain

Re: how to implement cross domain

Postby priya » Mon Dec 23, 2013 4:27 am


Sorry. I am not getting the solutions yet. I will clearly explain my issue with example. Using the ajax call i am calling one url in a function.

function getadv(){
var url;
type: "GET",
url: "",
async: false,
success: function(message){


Using the first ajax call i am getting the xml url which i have to parse as the url for the second ajax call. I am getting the xml url dynamically. My application hosted server and the first ajax url are in the same server.

function vid_samp_url(xml_url){
url: xml_url,
async: false,
success: function(xml){
console.log("xml call succeed");
From the second ajax i have to get the video path but it is not calling the xml url which is in the another server. I am not using php in my app.

Can you please help me in this
Posts: 16
Joined: Sun Aug 25, 2013 10:53 pm

Re: how to implement cross domain

Postby Support_STA » Mon Dec 23, 2013 6:48 am

The problem may be that you are using jQuery version 1.8 or newer in which synchronous ajax calls are deprecated. Please review the jQuery.ajax () documentation for the async property. A solution could be to move the call to vid_samp_url into the success function of getadv and setting async to true or removing it.

Please avoid synchronous requests, as they may potentially hang the browser for a long time.

Posts: 136
Joined: Fri Aug 09, 2013 3:56 am


Return to App development questions