Wait Window function | | |
Hello...
I have a page located in a frame. This page contains a form.
When the user submit this form I want to popup a "Please Wait" window popup
window
The post may take some time for the server to process.
So when the new windows is loaded into the browser, I want to close this
Wait window.
I have found a global JavaScript variable I may use.
Like: top.waitwindow
So when the user press submit I use onSubmit=openWaitWindow()
And at the bottom I use top.waitwindow.close();
But this is not working at all.
Declared in the frame window
top.WaitWindowVar = null;
On the submit page
function openWaitWindow()
{
top.WaitWindowVar=window.showModelessDialog("WaitW indow.html","Dialog
Arguments Value","dialogHeight:100px; dialogWidth:200px; dialogTop:px;
dialogLeft:px; edge:Raised; center:Yes; help:No; resizable:No; status:No;
scroll:No; Unadorned:Yes ");
}
And at the bottom on the new page:
top.WaitWindowVar.close();
Any idea how I can do this? | | | | re: Wait Window function
GTi wrote:
[color=blue]
> I have a page located in a frame. This page contains a form.
> When the user submit this form I want to popup a "Please Wait" window popup
> window[/color]
You don't want to do this. Popup windows are a Bad Thing. They allocate
system resources which often are not freed completely when the windows are
closed (especially on Windows 9x) and are therefore to be avoided.
Besides, the window object needs to be created first, so it is likely that
on a low-end system or a thin bandwidth connection the send process is
complete before the popup window or its document is even loaded completely.
And last but not least, for the first reason popup windows can and will be
blocked by users.
[color=blue]
> The post may take some time for the server to process.
> So when the new windows is loaded into the browser, I want to close this
> Wait window.[/color]
When submitting a form, there is generally no need to let the user know that
they must wait, since on all UAs I know, the submitting window is blocked
and a `wait' cursor (an hourglass with default Windows cursor scheme) or
something comparable is displayed.
But if you think a feedback is required anyway, you should use JavaScript
to manipulate the DOM, maybe showing a `Wait' text instead within the
submitting document.
If you want to counteract multiple clicking of the submit button (a known
problem,) you can set a timeout on click of the button to disable it and
re-enable it in the onunload handler of the window or document (in the case
someone uses the `Back' button if the submit failed.)
[color=blue]
> function openWaitWindow()
> {
> top.WaitWindowVar=window.showModelessDialog("WaitW indow.html","Dialog
> Arguments Value","dialogHeight:100px; dialogWidth:200px; dialogTop:px;
> dialogLeft:px; edge:Raised; center:Yes; help:No; resizable:No; status:No;
> scroll:No; Unadorned:Yes ");
> }[/color]
You know that this is IE-only? For popup windows you use the
window.open(...) method. And it is evil[tm] that you forbid
the user to scroll the window content *and* also forbid that
they resize the window here. How do you think they get to the
information if their settings (font size, content zoom aso.)
don't allow the content to be displayed within the rectangle
you specified?
The following shows the scrollbars. If you don't like them
to be displayed, change `scrollbars' into `resizable' (since
`no' is the default for both options):
top.foobar = window.open("WaitWindow.html", "foo_bar",
"height=100,width=200,scrollbars=yes,dependent=yes ");
PointedEars | | | | re: Wait Window function
Thomas,
If my project was a "public" internet web page,
I totally agree with you.
But, in this case we are talking about a software with web interface.
We say it will only work with IE 5.5 or newer since this is the
world leading browser today (no more discussions please).
So I will continue to find a solution to display some kind of
"Please Wait" window with only a gif picture on it
(That why I don't need scrollbars on it).
"Thomas 'PointedEars' Lahn" <PointedEars@web.de> wrote in message
news:3F99D328.2030708@PointedEars.de...[color=blue]
> GTi wrote:
>[color=green]
> > I have a page located in a frame. This page contains a form.
> > When the user submit this form I want to popup a "Please Wait" window[/color][/color]
popup[color=blue][color=green]
> > window[/color]
>
> You don't want to do this. Popup windows are a Bad Thing. They allocate
> system resources which often are not freed completely when the windows are
> closed (especially on Windows 9x) and are therefore to be avoided.
>
> Besides, the window object needs to be created first, so it is likely that
> on a low-end system or a thin bandwidth connection the send process is
> complete before the popup window or its document is even loaded[/color]
completely.[color=blue]
>
> And last but not least, for the first reason popup windows can and will be
> blocked by users.
>[color=green]
> > The post may take some time for the server to process.
> > So when the new windows is loaded into the browser, I want to close this
> > Wait window.[/color]
>
> When submitting a form, there is generally no need to let the user know[/color]
that[color=blue]
> they must wait, since on all UAs I know, the submitting window is blocked
> and a `wait' cursor (an hourglass with default Windows cursor scheme) or
> something comparable is displayed.
>
> But if you think a feedback is required anyway, you should use JavaScript
> to manipulate the DOM, maybe showing a `Wait' text instead within the
> submitting document.
>
> If you want to counteract multiple clicking of the submit button (a known
> problem,) you can set a timeout on click of the button to disable it and
> re-enable it in the onunload handler of the window or document (in the[/color]
case[color=blue]
> someone uses the `Back' button if the submit failed.)
>[color=green]
> > function openWaitWindow()
> > {
> > top.WaitWindowVar=window.showModelessDialog("WaitW indow.html","Dialog
> > Arguments Value","dialogHeight:100px; dialogWidth:200px; dialogTop:px;
> > dialogLeft:px; edge:Raised; center:Yes; help:No; resizable:No;[/color][/color]
status:No;[color=blue][color=green]
> > scroll:No; Unadorned:Yes ");
> > }[/color]
>
> You know that this is IE-only? For popup windows you use the
> window.open(...) method. And it is evil[tm] that you forbid
> the user to scroll the window content *and* also forbid that
> they resize the window here. How do you think they get to the
> information if their settings (font size, content zoom aso.)
> don't allow the content to be displayed within the rectangle
> you specified?
>
> The following shows the scrollbars. If you don't like them
> to be displayed, change `scrollbars' into `resizable' (since
> `no' is the default for both options):
>
> top.foobar = window.open("WaitWindow.html", "foo_bar",
> "height=100,width=200,scrollbars=yes,dependent=yes ");
>
>
> PointedEars
>[/color] | | | | re: Wait Window function
essayez le processus suivant :
1) form is send to server (by action="myprog")
2) server send page with code <h1> WAIT </h1> to display
3) server works (store data etc..)
4) server at end : send '<script>
href.location="javascript:history.go(-1);"</script>'
GTi a écrit:[color=blue]
> Hello...
>
> I have a page located in a frame. This page contains a form.
> When the user submit this form I want to popup a "Please Wait" window popup
> window
> The post may take some time for the server to process.
> So when the new windows is loaded into the browser, I want to close this
> Wait window.
>
> I have found a global JavaScript variable I may use.
> Like: top.waitwindow
> So when the user press submit I use onSubmit=openWaitWindow()
> And at the bottom I use top.waitwindow.close();
>
> But this is not working at all.
>
> Declared in the frame window
> top.WaitWindowVar = null;
>
> On the submit page
> function openWaitWindow()
> {
> top.WaitWindowVar=window.showModelessDialog("WaitW indow.html","Dialog
> Arguments Value","dialogHeight:100px; dialogWidth:200px; dialogTop:px;
> dialogLeft:px; edge:Raised; center:Yes; help:No; resizable:No; status:No;
> scroll:No; Unadorned:Yes ");
> }
>
> And at the bottom on the new page:
> top.WaitWindowVar.close();
>
>
> Any idea how I can do this?
>
>
>
>[/color] | | | | re: Wait Window function
GTi wrote:
[color=blue]
> [...]
> We say it will only work with IE 5.5 or newer since this is the
> world leading browser today (no more discussions please).
> [...]
> [Fullquote][/color]
As you wish.
PointedEars |  | Similar JavaScript / Ajax / DHTML bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,295 network members.
|