Re: Unspecified Error with onbeforeunload and document.form.submit

From: Dustin Goodyear (bigdustin_at_gmail.com)
Date: 11/02/04


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;
        }
}



Relevant Pages

  • Re: Ping Lesley
    ... More and more I am realising how overwhelmed I am, Dave usually does ... care when it looks like he is getting fit to go home. ... Home care here in Leics will not do cleaning if there is a partner in the ... I've been out of adult work since ...
    (rec.pets.cats.anecdotes)
  • Re: Pointless Friendlies
    ... Now now, Dave, Don't think we haven't noticed! ... Trouble is, I'm not suffering. ... I don't care about synchronised swimming. ... the biggest contributers about NZ rugby, one can only conclude by your ...
    (rec.sport.rugby.union)
  • Fun with Messages (was Re: New DCL qualifier suggestion.)
    ... Third option is to modify the messages you don't care about; ... NOFILPURG <Ignore this error, Dave doesn't care>/INFORMATIONAL ... $ pur x.x! ... CHARON-VAX CHARON-AXP DataStream Reflection PreciseMail HP Commercial ...
    (comp.os.vms)
  • Not about the late show
    ... She is a lovely African American woman who is the President of ... If she was Asian or Hispanic, they wouldn't care. ... Well I see how Dave treat some of ... the black female guest on the show. ...
    (alt.fan.letterman)
  • Re: Not about the late show
    ... saying about the relationship. ... If she was Asian or Hispanic, they wouldn't care. ... Well I see how Dave treat some of ... the black female guest on the show. ...
    (alt.fan.letterman)