Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Page Loading message to popup?

Posted on 2003-11-05
5
Medium Priority
?
460 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 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