0

1) I have this function in my .html file. This .html file is hosted on google site, but I can make a connection to www.yahoo.com using the makeRequest function, infact I can make connection to any site that is not hosted on google site. My problem is, the moment i change the URL to a http://mymachine:8080, the makeRequest does not work any more.

2) I am making sure that the client accessing it also withen the network and the machine is pingable, but it just does not work from javascript. What I am doing wrong??

function makeConnectionToServer()
{

    var params = {};  
    params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;  
params[gadgets.io.RequestParameters.METHOD]=gadgets.io.MethodType.GET;
    var url = "http://www.yahoo.com";
    gadgets.io.makeRequest(url, state_Change, params);

}
jmac
  • 7,078
  • 2
  • 29
  • 57
user139123
  • 111
  • 1
  • 2
  • 5

1 Answers1

0

I don't know how the makeRequest function works, but I'm guessing that it's an external API that uses server-side code to make the request. When you put your own machine's URL, a firewall may be blocking that server side request and preventing you from getting the response.

Salty
  • 6,688
  • 3
  • 33
  • 31