473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Any elegant way of doing this?


Hi,

Upon clicking a button I perform some heavy server side calculations lasting up to five minutes. During this time, the web page appear to be loading the response page.

Is there some elegant way to show progress to the user? The server side calculations are done in four separate methods. I imagine the user might be interested in knowing when one method is done and the next is running.

Javascript and threading?

Morten
Nov 19 '05 #1
4 1148
Do a search on "Wait Message" and you should get plenty of hits...
Typically what you do is a Response.Flush() to force what you have to the
screen (I usually use a animated GIF) and then the page will continue to
process.
If your code takes 5 min to execute you may want to kick it off
independantly though, and let the user continue on and check back later for
the results.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Morten Wennevik" wrote:

Hi,

Upon clicking a button I perform some heavy server side calculations lasting up to five minutes. During this time, the web page appear to be loading the response page.

Is there some elegant way to show progress to the user? The server side calculations are done in four separate methods. I imagine the user might be interested in knowing when one method is done and the next is running.

Javascript and threading?

Morten

Nov 19 '05 #2
Morten,

I feel that you'll need to make a tradeoff somewhere between
elegance+simplicity and accuracy+load. Your first option is to create a
real simple PLEASE WAIT page with some details on it and the time it might
take.

But if you want the user to know what's going on when, then you can use
Resonse.Flush()es to write chunks of text to the browser indicating the
processes that have been performed. (Look at www.wwhois.com to see what I
mean)

And yet another option would be to use XMLHTTP to perform requests to the
page with your 4 operations, and updating content in your calling page as
and when a process is complete.

The last two methods can prove to be 'heavy' on the server, and if you have
a *LOT* of visitors on your site, then you shouldn't consider it. Else,
have fun implementing it.

HTH
Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"Morten Wennevik" <Mo*************@email.adr> wrote in message
news:op***************@tr023.bouvet.no...

Hi,

Upon clicking a button I perform some heavy server side calculations
lasting up to five minutes. During this time, the web page appear to be
loading the response page.

Is there some elegant way to show progress to the user? The server side
calculations are done in four separate methods. I imagine the user might
be interested in knowing when one method is done and the next is running.

Javascript and threading?

Morten

Nov 19 '05 #3
On Tue, 08 Nov 2005 14:54:04 +0100, Curt_C [MVP] <software_at_darkfalz.com> wrote:
Do a search on "Wait Message" and you should get plenty of hits...
Typically what you do is a Response.Flush() to force what you have to the
screen (I usually use a animated GIF) and then the page will continue to
process.
If your code takes 5 min to execute you may want to kick it off
independantly though, and let the user continue on and check back later for
the results.

Thanks, I'll look into it
Nov 19 '05 #4
Thanks, I'll look into it

On Tue, 08 Nov 2005 15:03:25 +0100, S.M. Altaf [MVP] <sm*****@PLEASEDONTSPAMMEmsn.com> wrote:
Morten,

I feel that you'll need to make a tradeoff somewhere between
elegance+simplicity and accuracy+load. Your first option is to create a
real simple PLEASE WAIT page with some details on it and the time it might
take.

But if you want the user to know what's going on when, then you can use
Resonse.Flush()es to write chunks of text to the browser indicating the
processes that have been performed. (Look at www.wwhois.com to see what I
mean)

And yet another option would be to use XMLHTTP to perform requests to the
page with your 4 operations, and updating content in your calling page as
and when a process is complete.

The last two methods can prove to be 'heavy' on the server, and if you have
a *LOT* of visitors on your site, then you shouldn't consider it. Else,
have fun implementing it.

HTH
Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"Morten Wennevik" <Mo*************@email.adr> wrote in message
news:op***************@tr023.bouvet.no...

Hi,

Upon clicking a button I perform some heavy server side calculations
lasting up to five minutes. During this time, the web page appear to be
loading the response page.

Is there some elegant way to show progress to the user? The server side
calculations are done in four separate methods. I imagine the user might
be interested in knowing when one method is done and the next is running.

Javascript and threading?

Morten



Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kamilche | last post by:
''' Is there a more elegant way of doing this? I would like to have the arguments to pack automatically taken from lst. ''' def pack(self): lst = return struct.pack('<IIIiiiBBBHHH', \...
6
by: Kamilche | last post by:
Is there a more elegant way to change the working directory of Python to the directory of the currently executing script, and add a folder called 'Shared' to the Python search path? This is what...
3
by: Mark Turney | last post by:
Problem: I have a vector full of two different derived class objects (class B and class C) that are derived from the same base class A. I want to loop through vector and invoke a member function...
1
by: Jay Balapa | last post by:
Hello, Iam creating a query page, in which a Drop Down List will have collection of fieldnames. Is there a elegant way of doing it? Currently Iam opening up a datareader and using...
1
by: Alex Maghen | last post by:
Whenever I create tables in HTML, I have to specify the widths of the CELLs within each row. It's incredibly repetative because it seems I have to repeat these seem cell-width values in each row of...
8
by: Braky Wacky | last post by:
Hello, I have an ASP.NET webpage that uses an instance of System.Web.UI.HtmlControls.HtmlInputFile for uploading files to our server. I came across the documentation at MSDN for upping the...
28
by: Rob Cowie | last post by:
Hi all, I wish to generate a sequence of the form 'aaa', 'aab', aac'.... 'aba', 'abb', 'abc' etc. all the way to 'zzz'. How would you construct a generator to acheive this? A simple,...
3
by: Anonymous | last post by:
I want to be able to restrict the set of classes for which a template class can be instantiated (i.e enforce that all instantiation MUST be for classes taht derive from a base type BaseType). ...
3
by: Thomas Pajor | last post by:
Hey everybody, I got into serious trouble with template programming. I have a class which uses three template arguments, say template<typename Atype, typename Btype, typename Ctype> class...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.