views:

12

answers:

2

hey all in brief, i have an application X that uses another application Y in certain cases.

X in on an apache server, Y is on a tomcat server.

i have a button in html file in Y which calls a js function StopApp(). This function StopApp() calls the script "StopApp.php" which is on X.

so what i did inside StopApp() is sthg like

function StopApp()
{
//USING JQUERY $.ajax
  $.ajax({
    type: "GET",
        url: pathofX + "StopApp.php",
        cache: false,
        data:"blablabla",
        dataType: "xml",

      success: function(xml)
    {

    }
  });
}

OK so the thing is "StopApp.php" return xml document, and i would like to get the values of the xml tag inside the success field... but i am not being able to do that... i know it has to do with cross domain coz its 2 different servers, but i don't know how to resolve it... I would appreciate much your help thx a lot:)

A: 

Cross-domain calls are forbidden, you cannot circumvent this any portable way.

Btw, accept some of your older questions.

Yossarian
A: 

If you are allowed to change StopApp.php (alternatively, you can create a wrapper that calls functions from StopApp.php) and put all the logic in this file(I mean all actions the function success is supposed to do), you can use technique from the article Ajax & PHP without using the XmlHttpRequest Object. Briefly, you need to create a SCRIPT element with http:://Y/StopApp.php source and append it to document body. It's a pure JS solution, but maybe you'll find jquery plug-in that can do the same.

a1ex07