As an interesting addition, you can write intermittent script sections to
the page as the document loads and modify the .value and .display of a
button to display some text (eg. 10%, 20%, 30% etc).
eg.
<%
'Percentage is anything from 0 to 100
Sub WriteProgress(pstrProgress)
Response.Write "<script>"
Response.Write " var pobjButton =
document.getElementById('progressbutton')";
Response.Write " pobjButton.value = '" & pstrProgress & "';"
Response.Write "</script>"
'Make sure this gets sent.
Response.Flush
End Sub
Sub ClearProgress()
Response.Write "<script>"
Response.Write " var pobjButton =
document.getElementById('progressbutton')";
Response.Write " pobjButton.style.display = 'none';"
Response.Write "</script>"
'Make sure this gets sent.
Response.Flush
End Sub
%>
<!-- Add the relevant style properties to change the button to look like
normal text ? -->
<input id="progressbutton" type="button" style="border: 1px solid black;
width: 120px" value="Loading: 0%"/>
<%
'Do some work and repeatedly (eg. a loop):
For i = 1 to 100
WriteProgress "Progress: " & i & "%"
Next
WriteProgress "Progress: Done"
ClearProgress
%>
Of course you can optimise the JavaScript a bit more by using functions
defined at the top of the page etc.
Chris.
"Larry Woods" <la***@lwoods.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks, Ray.
Tried the code but can't get it to work with NS so won't work... Public
site.
Larry
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:ut**************@TK2MSFTNGP12.phx.gbl...
Did you look at the darkfalz.com link? You can get rid of it using client
side code and setting the display style. See here.
http://www.darkfalz.com/1058/
Ray at work
"Larry Woods" <la***@lwoods.com> wrote in message
news:ei*************@TK2MSFTNGP12.phx.gbl... I asked the same original question a few minutes ago and was referred to
this thread...and it is 90% of what I want. The only problem that I
have is that I want to get rid of the "Please wait message" after the page has
filled. Am I looking at some sort of redirect???
TIA,
Larry Woods