Solved

Page Loading message to popup?

Posted on 2003-11-05
5
456 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Classic ASP - cannot find folder on the server 5 33
Css expand Div to fit its content (Of other divs) 4 52
Attaching a file to SMTP in Classic ASP 1 39
Pass through dll 2 81
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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 give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

813 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

19 Experts available now in Live!

Get 1:1 Help Now