Solved

Page Loading message to popup?

Posted on 2003-11-05
5
455 Views
Last Modified: 2008-02-01
Hi all,

I have an ASP page that has a form and a submit button for going out to the database for specific date information on records.  This form post the info into the same page, and takes as much as 2-3 minutes to load the data.

I want to have a popup to tell the user that the information is loading.  I would like this popup to be enabled only if the submit button is pressed, and to go away when the page has completed loading.

I don't want to reinvent the wheel, so can someone share their code for this with me.
I would be very grateful.

Cheers,
Sue
0
Comment
Question by:aspsue
5 Comments
 
LVL 35

Expert Comment

by:YZlat
ID: 9688325
<html>
<head>
<script language="JavaScript">

<!--//

function new_window(url) {

      link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=500,left=40,top=50");

}

//-->
</script>
</head>
<body>

<input type="submit" name="submit1" onClick="javascript:new_window('wait.asp' )">
</body>
</html>

Also create another page called wait.asp with a line "Wait while the page is loading"
0
 
LVL 4

Expert Comment

by:kblack15217
ID: 9688708
Unfortunately, this isnt as easy as it sounds.   The solution above will not work for numerous reasons.   The most important reason is that the submit button above is not on any form, and therefore will not submit a form.   Even if there was a form, the window would pop up and not go away after processing is done, since processing is on the server and the pop up is on the client.   in other words, the method above could let the user know that the operation would take time, but thats it.

There are many ways to do what you want:   The most straightforward way involves remote scripting.   Your javascript code would have to open the wait window, then call a remote asp script to process your data, then close the window and update the page with your results.

There is too much detail to explain in this forum, but this link can help:
http://www.devarticles.com/art/1/99

Otherwise, you will just have to live with a message that alerts the user that the processing will take awhile.  YOu can do this with
<input type="submit" name="submit1" onClick="alert('your message');">

within your form.
 
       

0
 
LVL 3

Expert Comment

by:tonydspaniard
ID: 9690259
Hi there,
You can workaround too by having two frames.. the one on top (0 pixels height - that is, not visible) could process the server data or submission from bottom frame.. when this occurs, a javascript code could display a message or an animated image with its simple document.write function (this will clear screen).. to give some feedback to the user.. then... when the top frame finished server processing.. a simple onload=parent.close() function will close the pop-up window...

hope this helps

Good luck
0
 
LVL 7

Expert Comment

by:vnvk
ID: 11830624
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    PAQ - no points refunded

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

vnvk
EE Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11862963
PAQed - no points refunded (of 50)

modulo
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
API Location, separating out information 10 46
Connection String to remote Server not working 3 72
INNER JOIN ? 8 41
wordpress display sub menu only when click 12 23
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now