ok - just for future reference in case anyone else runs into this issue
the error occurs when the javascript function invoking the PageMethod is
called from a different window
( mozilla seems to be maybe getting confused as to which objects live in
which window ? - or not )
<script type="text/javascript">
var imagebrowser =null;
function SelectImage()
{
. . .
imagebrowser =
window.open("Se lector.aspx","S elector","menub ar=0,minimizabl e=0,modal=1,sta tus=0,toolbar=0 ,width=600,heig ht=600");
}
/*
PageMethods call will fail under mozilla if called from this
function when called from another window : opener.SelectCa llback(
selectdURL );
splitting this into 2 functions and using timer to invoke second
part , letting this & functions complete solves the problem
function SelectCallback( url )
{
imagebrowser.cl ose();
imagebrowser=nu ll;
. . .
PageMethods.DoS omething( url , DoSomethingCall back , Timeout ,
Error );
}
*/
function SelectCallback( url )
{
imagebrowser.cl ose();
imagebrowser=nu ll;
setTimeout("Sel ectCallback2('" +url+"')",0);
}
function SelectCallback2 ( path )
{
. . .
PageMethods.DoS omething( path , DoSomethingCall back, Timeout ,
Error );
}
function DoSomethingCall back( rslt )
{
. . .
}
function Timeout( txt )
{
alert('Timeout '+txt);
}
function Error( txt )
{
alert('Error '+txt);
}
</script>
<input type="button" value="Select Image" onclick="GetIma ge();return 0;" />
"germ" <ge**@canada.co mwrote in message
news:uv******** ******@TK2MSFTN GP04.phx.gbl...
so ... what .. is this a dirty little secret that I wasn't supposed to
mention ?
Is no one else using asp.net ajax web service calls or are they just
ignoring any browsers that generate this error ?
"germ" <ge**@canada.co mwrote in message
news:u3******** ******@TK2MSFTN GP03.phx.gbl...
>doing a simple page webmethod call an a page via PageMethods works fine
in ie7 & opera9
the same call on firefox ( and I assume netscape ) generates the
following error :
Error: [Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_ AVAILABLE) [nsIXMLHttpReque st.status]" nsresult:
"0x80040111 (NS_ERROR_NOT_A VAILABLE)" location: "JS frame ::
http://hgha.gerzio.ca/ScriptResource...79517344763787
:: Sys$Net$XMLHttp Executor$get_st atusCode :: line 4166" data: no]
Source File:
http://hgha.gerzio.ca/ScriptResource...79517344763787
Line: 4166
The script code this points to is :
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjax.j s
// Microsoft AJAX Framework.
. . .
function Sys$Net$XMLHttp Executor$get_st atusCode() {
/// <value type="Number"></value>
if (arguments.leng th !== 0) throw Error.parameter Count();
if (!this._respons eAvailable) {
throw
Error.invalidO peration(String .format(Sys.Res .cannotCallBefo reResponse,
'get_statusCod e'));
}
if (!this._xmlHttp Request) {
throw
Error.invalidO peration(String .format(Sys.Res .cannotCallOuts ideHandler,
'get_statusCod e'));
}
>>> return this._xmlHttpRe quest.status;
}
Google turns up a number of references to this problem in general but no
fixes for asp.net ajax in particular.
Since this problem is caused by a problem buried in the microsoft ajax
code I am at a loss as to how to proceed.
Do we just drop ajax for firefox & netscape users until MS puts out a fix
?
Or is there a fix out there that I haven't stumbled across yet ?
Gerry