Solved

Page Loading message to popup?

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
if form parameter is null redirect 2 45
Update Stored Procedure question 8 41
Group by correlation 4 43
Select distinct 25 60
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…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 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

20 Experts available now in Live!

Get 1:1 Help Now