Re: Unspecified Error with onbeforeunload and document.form.submit
From: Dustin Goodyear (bigdustin_at_gmail.com)
Date: 11/02/04
- Next message: Dave Methvin: "Re: JScript and return code"
- Previous message: Uwe Galle: "JScript and return code"
- In reply to: Dustin Goodyear: "Re: Unspecified Error with onbeforeunload and document.form.submit"
- Messages sorted by: [ date ] [ thread ]
Date: 2 Nov 2004 05:45:49 -0800
bigdustin@gmail.com (Dustin Goodyear) wrote in message news:<63028d88.0411011327.22d5ea9@posting.google.com>...
> Dave,
> I guess I am not really sure what I am returning a value to. Basiclly
> this is just the code that is causing me problems... if there is any
> way to get the onbeforeunoad to act in the same manner without the
> error, thats what I want to get done.
>
>
> "Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message news:<uy7YvFstEHA.2664@TK2MSFTNGP12.phx.gbl>...
> > Dustin Goodyear wrote:
> > > function unloadMess(){
> > > mess="I am the changed unload message";
> > > return mess;
> > > }
> > > window.onbeforeunload = (true) ? unloadMess : null;
> >
> > I'm curious about the above. To what do you think you're returning a value?
In case anyone is curious, I found this solution to the problem in
another thread. The guy who posted it said it was inelegent or a hack
or something, but as long as it works, I couldn't care how ugly it is!
:-) Anyway, he suggested just trapping the error. Which is what I
am going to do!
function window.onerror(strError)
{
if (strError.toLowerCase().indexOf('unspecified error') >= 0)
{
window.event.returnValue = true;
}
else
{
window.event.returnValue = false;
}
}
- Next message: Dave Methvin: "Re: JScript and return code"
- Previous message: Uwe Galle: "JScript and return code"
- In reply to: Dustin Goodyear: "Re: Unspecified Error with onbeforeunload and document.form.submit"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|