Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 28th, 2004, 10:19 PM
Authorized User
 
Join Date: Apr 2004
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default Progressbar !

How to calculate the time Until the page load complete

 
Old May 30th, 2004, 01:28 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

i don't think that you could expect the time untill the page load
it depends on many things for example the server load >>> and the trafic between you and the webserver>>>>
you could display some thing like animation untill the page complete loading

Ahmed Ali
Software Developer
 
Old June 1st, 2004, 06:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Minhtri,

It is very simple.

You got to store the current Time into a variable at the start of the page. Then store the current Time into another variable at the end of the page. Find the difference between those two and display it somewhere at the end of page.

Code:
<%
Dim starttime
starttime = Timer 'now()
%>
Write your page code...
blah blah...
blah blah...


<%
Dim endtime , timetaken
endtime = Timer 'now()
timetaken = FormatNumber(endtime - starttime , 4)
Response.Write "This page took " & timetaken & "seconds to load"
%>

Hope that helps.
Cheers!

_________________________
-Vijay G
Strive for Perfection
 
Old June 1st, 2004, 11:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I do not think that will do for minhtri, since the headline says progressbar. The question is probably if it is possible to know the loading time before loading the page, so that it is possible to show a progress bar during the load process, right!?

The progress bar has been discussed several times. I do not think it is possible what you want minhtri, however you could do one of those progress bars that does not end, but show that the page is loading. Take a look at e.g. www.speednames.com and search for a domain. This will show you such a progress bar.

Jacob.





Similar Threads
Thread Thread Starter Forum Replies Last Post
file uploader with simulated progressbar kunchala_rakesh Ajax 1 September 13th, 2007 10:11 PM
ProgressBar on httpwebrequest panuvin C# 1 February 5th, 2007 03:24 PM
progressbar vnt C# 0 May 11th, 2005 08:14 PM
ProgressBar and long event Ciarano VB How-To 6 April 1st, 2004 05:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.