Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please wait! Strategy needed 1

Status
Not open for further replies.

hdougl1

Programmer
Dec 6, 2000
54
0
0
US
I have an asp page which instantiates a dll I created which queries a couple databases on deferent servers. The query process is very slow, so I would like to write to the page "Please wait query in progress" since all of the processing is handling by the dll including all of the creation of html I don't see a way to update the users page. I also have to present the data in a printable format so how do I over come the obstacles; can’t use a redirect because I've already sent html to the client "Please wait". I don't know how to change the display to none if the text was in an html tag from the server side. Help I've created a monster and I'm lost in my on code.
Thanks in advance
 
onpnt, thanks for the link that was some very useful code. I however have reservations on opening and closing "popup" windows on a user desktop. This may be pety since I don't have any other choice but... I don't know thanks anyway.
 
if u turn buffering off u can send inline <script> tags. This can provide a single page solution to an initial message for a long process, something like this:

<html>
<body>
<div id=&quot;pleasewait&quot;>Please Wait</div>
...
now on server long process is running
now it finishes so begin sending HTML
<table/div/whatever id=&quot;pgcontent&quot;>
.... rest of page
</table>
</body>
<script>
document.pleasewait.style.display = &quot;none&quot;;
document.pgcontent.style.display = &quot;block&quot;;
</script>
</html>

of course if u need NS support that has to be considered etc.

does that help? -There are only 10 types of people in the world, those who understand binary and those who don't-

-pete
 
I cound'nt get this to work, I don't think you can refer to objects on the page from the server can you?

<%@ Language=VBScript %>
<html>
<body>
<div id=&quot;pleasewait&quot;>Please Wait</div>
<%
'visual delay to see the message go away
for i = 1 to 1000000
i = i + 1
next
%>
</body>
<script>
document.pleasewait.style.display = &quot;none&quot;
</script>
</html>
 
>> I cound'nt get this to work

yeah that was like psuedo code not runnable code. sorry for the confusion. u need to add all the details of addressing the <div> element etc. -There are only 10 types of people in the world, those who understand binary and those who don't-

-pete
 
The following code should be all that's neccesary to complete this basic script, howerver the error I recieve is Error:document.myform.pleasewait.style is null or not an object. Any other ideas
Thanks

<%@ Language=VBScript %>
<%Response.Buffer = false%>
<html>
<body>
<form name=&quot;myform&quot;>
<div id=&quot;pleasewait&quot; name=&quot;pleasewait&quot;>Please Wait</div>
<%
'visual delay to see the message go away
for i = 1 to 1000000
i = i + 1
next
%>
</body>
</form>
<script>
document.myform.pleasewait.style.display = &quot;none&quot;
</script>
</html>
 
document.all.pleasewait.style.display = &quot;none&quot;
 
document.all is IE only...

use this for IE5+, NS6+, Moz1+:

<%@ Language=VBScript %>
<%Response.Buffer = false%>
<html>
<body>
<form name=&quot;myform&quot;>
<div id=&quot;pleasewait&quot; id=&quot;pleasewait&quot;>Please Wait</div>
<%
'visual delay to see the message go away
for i = 1 to 1000000
i = i + 1
next
%>
</body>
</form>
<script>
document.getElementById(&quot;pleasewait&quot;).style.display = &quot;none&quot;
</script>
</html>
=========================================================
if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top