J
JDeats
From my development envrionment (i.e. a single WinXP notebook PC) I
have a basic AJAX application that is making the call to a Windows
Form page that just returns the request back to the AJAX client from
the JavaScript HttpXMLRequest
protected void Page_Load(object sender, EventArgs e)
{
string txt = "";
string input = null;
StreamReader sr = new StreamReader(Request.InputStream);
while ((input = sr.ReadLine()) != null)
{
txt += input;
input = null;
}
sr.Close();
sr.Dispose();
Response.Write(txt);
Response.End();
}
In the onreadystatechange event, once the request is returned I am
performing a simple JavaScript alert() to display back the response.
This works fine from IE when it's calling a local server either IIS or
from VS.NET 2005's ASP.NET development Server on port 2160. However
if I try to make the call to either of these servers from FireFox or
Safari it appears the call to HttpXMLRequest never goes through.
I understand there is a cross-domain restriction on HttpXMLRequest
calls in Safari and FireFox that is handled differently in IE, I
suspect this has something to do with the problem.... Any advice?
have a basic AJAX application that is making the call to a Windows
Form page that just returns the request back to the AJAX client from
the JavaScript HttpXMLRequest
protected void Page_Load(object sender, EventArgs e)
{
string txt = "";
string input = null;
StreamReader sr = new StreamReader(Request.InputStream);
while ((input = sr.ReadLine()) != null)
{
txt += input;
input = null;
}
sr.Close();
sr.Dispose();
Response.Write(txt);
Response.End();
}
In the onreadystatechange event, once the request is returned I am
performing a simple JavaScript alert() to display back the response.
This works fine from IE when it's calling a local server either IIS or
from VS.NET 2005's ASP.NET development Server on port 2160. However
if I try to make the call to either of these servers from FireFox or
Safari it appears the call to HttpXMLRequest never goes through.
I understand there is a cross-domain restriction on HttpXMLRequest
calls in Safari and FireFox that is handled differently in IE, I
suspect this has something to do with the problem.... Any advice?