[Javascript] A Temporary Alert?

Peter Brunone peter at brunone.com
Mon Dec 24 10:07:13 CST 2007


> You see, I have a database access that can take up to five seconds 
> after the user clicks "Submit" and during that time I would like to 
> tell the user to wait (instead of clicking things widely and throwing 
> a tantrum) -- which is what I do when I don't know what's happening.

Oh, you mean something like this:

http://authors.aspalliance.com/peterbrunone/pleasewait.asp

It's a bit antiquated, but you get the general idea.

Peter

----------------------------------------

From: tedd tedd.sperling at gmail.com

At 6:58 AM -0700 12/23/07, David Lovering wrote:
>This is hardly the most elegant solution, but it works on most browser
>platforms I've dealt with.
>
>In the HTML body declaration of your dialog, create an 'onload' event
>handler of the following sort:
>
>onload = "setTimeout( 'window.this.close()', 5000)";
>
>This is dirt simple, and no doubt will call down the wrath of the Javascript
>gurus with much more refined (and less fragile) solutions.
>
>While you can reference an alert as a window and play the same games, it is
>often hard (and somewhat browser dependent) to do so; I prefer to create a
>child window and use it instead of a generic alert. With a little
>imagination, you can manipulate the window parameters so that the user is
>completely unaware that he is not talking directly to an alert - but you
>have the window id and name under your full control. It also is less
>complicated to reference the portion of the code in order to insert
>the onload handler.
>
>-- Dave Lovering

Thanks Dave -- I'll look into that.

It really doesn't have to be an Alert -- it could be a window.

You see, I have a database access that can take up to five seconds 
after the user clicks "Submit" and during that time I would like to 
tell the user to wait (instead of clicking things widely and throwing 
a tantrum) -- which is what I do when I don't know what's happening.

I'm actually surprised that such a critter isn't a staple for 
programming GUI stuff.

Cheers,

tedd

>----- Original Message -----
>From: "tedd" 
>> Hi gang:
>>
>> I've looked, but can not find a temporary Alert.
>>
>> What I mean is:
>>
>> "Hi, this is a temporary Alert box and I will automatically close in
>> 5 seconds."
>>
>> An Alert that will notify the user of something, but will NOT require
>> the user to respond to go away. But instead, will close on its own
>> after a set time.
>>
>> It sounds simple enough, but I couldn't find nor generate one. Can
>> this be done?
>>
>> Thanks in advance for any references or code.
>>
>> Cheers,
>>
>> tedd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20071224/337adcf8/attachment.htm>


More information about the Javascript mailing list