views:

296

answers:

1

Hello everyone, 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);

}
A: 

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