473,287 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

How to display "please wait.." after new window opens


Hi

I have a form that opens a new window for the results. Because the results
might take a few seconds due to server processing, I would like to display
a message "please wait" in the new window, erase that message when the
processing is done and show the results.

How is this done?

John Dalberg
Jul 23 '05 #1
3 4581
John Dalberg wrote:
Hi

I have a form that opens a new window for the results. Because the results
might take a few seconds due to server processing, I would like to display
a message "please wait" in the new window, erase that message when the
processing is done and show the results.

How is this done?

John Dalberg


Hi,
Open a named window with a static page eg. wait.html (with the word
"Please wait..." on it)
The use windowName.document.write(Results) to replace the static page
with results.

Kien
Jul 23 '05 #2
On Wed, 04 Aug 2004 20:38:13 GMT, Kien wrote:
John Dalberg wrote:
Hi

I have a form that opens a new window for the results. Because the results
might take a few seconds due to server processing, I would like to display
a message "please wait" in the new window, erase that message when the
processing is done and show the results.

How is this done?

John Dalberg


Hi,
Open a named window with a static page eg. wait.html (with the word
"Please wait..." on it)
The use windowName.document.write(Results) to replace the static page
with results.

Kien


It doesn't work for me. This is what I am doing. You can view the
javascript, form and the button.

<SCRIPT LANGUAGE="JavaScript">
<!--
var msgWindow;
var sResults;
function newWin(){
sResults = QueryResults;
strFeatures='resizeable=no,width=800,height=600';
msgWindow=window.open('wait.htm','',strFeatures);
msgWindow.document.write(sResults)
msgWindow.focus();
}

This is the form:
<form Method="get" name="frmDomainCheck" action="whois.asp"
target="QueryResults">

This is the button:
<input type="submit" value="Check For Availability" class="whois"
onclick="newWin();return true">

J.
Jul 23 '05 #3
John Dalberg wrote:
Hi

I have a form that opens a new window for the results. Because the results
might take a few seconds due to server processing, I would like to display
a message "please wait" in the new window, erase that message when the
processing is done and show the results.

How is this done?

John Dalberg


-- on the page used to initate generation of the report:

<input type="submit" value="Generate Report" onclick="openStatusWindow();">
<script type="text/javascript">
function openStatusWindow() {
if (window.open) {
var throwAway = window.open(
'status.html',
'statusWindow',
'width=400,height=200'
);
}
}
</script>

-- status.html:

<html>
<head>
<title>Generating report... please wait</title>
<script type="text/javascript">
function holdFocus() {
var t = setTimeout(holdFocus, 1000);
window.focus();
holdFocus.toString = function() {
return 'holdFocus();';
}
}
</script>
</head>
<body onload="holdFocus();">
<p align="center">Generating report... please wait</p>
</body>
</html>

-- on the page containing the resulting report:

<body onload="closeStatusWindow();">
<script type="text/javascript">
function closeStatusWindow() {
if (window.open) {
var w = window.open(
'about:blank',
'statusWindow',
'width=400,height=200'
);
if (w && !w.closed) {
w.close();
}
}
}
</script>

It's necessary to call window.open() again on the window named "statusWindow".
If you do not, you will not have a reference (handle) to it, and will not be
able to close it. I tested it in IE6SP1, Netscape 4.78, Firefox 0.9.2 and
Opera 7.53 and it allowed me to open and close the window without holding a
reference to it.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mvr | last post by:
Hi all Can some one give me a sample code to display a "please wait" message while retrieving results from the database in ASP. Thanks mvr
3
by: Kannan | last post by:
Hello, I have a requirement that specifies that I display a "Please Wait..." window (preferably modal) along with a gif that mimics a progress bar during a save operation. The dialog needs to be...
1
by: metsymani | last post by:
In my web application, I have a search screen coded in ASP.Net. The Search process takes lot of time. So, I need to show a wait page informing the user that "Search is in progress. Please wait" along...
1
by: Paul | last post by:
Hi I have a pretty simple VB.NET which contains some dropdown lists, a QUERY button, UPDATE button and datagrid. The page works great accept sometimes the database access behind the QUERY and...
9
by: John Walker | last post by:
Hi, I have a datagrid with a radiobutton template column, with AutoPostBack set to TRUE. When the user clicks on a radiobutton the application will PostBack, and in the PostBack there will be...
3
by: Ben Fidge | last post by:
Hi Our app performs a quite lengthy process when the user clicks a button. We'd like to display a little pop-up "Please Wait..." notification using an animated gif. How would I go about this?...
5
by: Jeremy | last post by:
Hi all, I have database actions that will potentially take several seconds to complete. My normal page uses AJAX so keeping the user informed of what is happening is not a problem. ...
2
by: ccbryan | last post by:
I have Googled and Googled, but I only find explanations of this for ASP.NET, etc. How do you put up a 'please wait' window at the beginning of a process and close it at the end of the process in a...
1
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, I have a webpage designed with asp.net 2.0. Is there a way to display a "please wait" message to the screen horizontally centered and veritcally 20px from the VISIBLE top of the page,...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.