ajax request

ajax request

Hey Guys,

I'm having a problem with ajax-calls in my jquery-mobile application. I'm doing an ajax call like

  1. $.ajax({
  2.       url:SOMEURL,
  3.       Origin: "*",
  4.       dataType: 'json',
  5.       success:function(data){
  6.             alert(data);
  7.       },
  8.       error:function(xhRequest, ErrorText, thrownError) {
  9.            console.log('xhRequest: ' + xhRequest + "\n");
  10.           console.log('ErrorText: ' + ErrorText + "\n");
  11.           console.log('thrownError: ' + thrownError + "\n");
  12.           alert("Could not connect to Server!");
  13.       }
  14. });
My Setup: 
  • - one PC that works as client, 
  • - one Server somewhere in the web
  • - one PCServer that works as client and as Server running python-SimpleHTTPServer where the clients can run the script from. In addition there is an apache-server running on that machine  that could replace Server

If SOMEURL points to a local apache-server
  • - calling the page from PCServer - everything works fine
  • - calling the page from PC - everything works fine

If SOMEURL points to Server:
  • - calling the page from PCServer - everything works fine
  • - calling the page from PC - get an Error but no specific information about what went wrong

Since I don't want to use the local apache server I need to use the Server. However I just can't figure out, why the PC can't get the information from Server

Can anyone help me please?

Thanks in advance
greets
golden_wing