rptodd1
10-30-2006, 11:42 PM
Why are Firefox 1.5 and 2.0 no seeing this method when IE6 does"
here's the import statements followed by the function imported, followed by the script trying to create a XMLHttpRequest, followed by the in document script using the imported createRequest() function.
<script language="JavaScript" src="C:/mydocs/work/docs/AJAX.js"> </script>
that function has a createRequest() that appears below
function createRequest()
{
var request = null;
try
{
request = new XMLHttpRequest();
}
catch (trymicrosoft)
{
// microsoft active x code that's working fine
}
if (request == null)
alert("There was an error creating the request. Please contact Your Daddy.");
else
return request;
}
This call throws a "CreateRequest not defined" error in the JavaScript debugger
<script language="JavaScript">
var request = createRequest();
alert("the request is outside function "+ request);
</script>
Why isn't Firefox seeing the function?
Thanks,
Robert
here's the import statements followed by the function imported, followed by the script trying to create a XMLHttpRequest, followed by the in document script using the imported createRequest() function.
<script language="JavaScript" src="C:/mydocs/work/docs/AJAX.js"> </script>
that function has a createRequest() that appears below
function createRequest()
{
var request = null;
try
{
request = new XMLHttpRequest();
}
catch (trymicrosoft)
{
// microsoft active x code that's working fine
}
if (request == null)
alert("There was an error creating the request. Please contact Your Daddy.");
else
return request;
}
This call throws a "CreateRequest not defined" error in the JavaScript debugger
<script language="JavaScript">
var request = createRequest();
alert("the request is outside function "+ request);
</script>
Why isn't Firefox seeing the function?
Thanks,
Robert