473,396 Members | 1,968 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,396 software developers and data experts.

Tell user page is "working" - not changing the page

Hi;

..NET 2.0

I have a situation where when the user selects an item in a drop down list,
the code behind is called to update the values in another list on the page.
This update can take 3 - 5 seconds.

When it is complete, the same page is still displayed. What is the best way
to tell the user the page is working? I don't like the idea of switching to a
page that says "thinking..." and then going back to the page on.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 9 '06 #1
8 2000
DWS
Search for atlas

Good Luck
DWS

"David Thielen" wrote:
Hi;

.NET 2.0

I have a situation where when the user selects an item in a drop down list,
the code behind is called to update the values in another list on the page.
This update can take 3 - 5 seconds.

When it is complete, the same page is still displayed. What is the best way
to tell the user the page is working? I don't like the idea of switching to a
page that says "thinking..." and then going back to the page on.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 9 '06 #2
Hi Dave,

For your scenario, you want to display some message on page to inform the
user the page is executing some task and do not leave the current page, I
think one common approach is use client-side script code to display an
image or Text (label or html <div> ) in the center of the page. Actually
we can put that image or Label in the page in advance and make it
invisible(set the html "display" style to "none". For example:

<img id="imgRing" src="Images/ReportServer.gif" style="display:none"
width="200" height="200" />

Then, in our button's client-side onclick event or the html <form>'s
"onsubmit", we can use script to make the image or label visible:

<script language="javascript">
function ShowImage()
{
document.getElementById("imgRing").src = "Images/Ring.gif";
document.getElementById("imgRing").style.display = "";

}
</script>
<form id="form1" runat="server" onsubmit="ShowImage();">
Hope this helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Mar 10 '06 #3
Dave Sussman and Alex Homer wrote this pretty "staged load" page display:

http://www.daveandal.net/books/6744/...edloading.aspx

It displays progress without switching the page.

There's a link to the code at that page.
Although it was written as an ASP.NET 1.1 sample, it will work in 2.0.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Thielen" <th*****@nospam.nospam> wrote in message
news:E8**********************************@microsof t.com...
Hi;

.NET 2.0

I have a situation where when the user selects an item in a drop down list,
the code behind is called to update the values in another list on the page.
This update can take 3 - 5 seconds.

When it is complete, the same page is still displayed. What is the best way
to tell the user the page is working? I don't like the idea of switching to a
page that says "thinking..." and then going back to the page on.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Mar 10 '06 #4
great idea - thanks

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Steven Cheng[MSFT]" wrote:
Hi Dave,

For your scenario, you want to display some message on page to inform the
user the page is executing some task and do not leave the current page, I
think one common approach is use client-side script code to display an
image or Text (label or html <div> ) in the center of the page. Actually
we can put that image or Label in the page in advance and make it
invisible(set the html "display" style to "none". For example:

<img id="imgRing" src="Images/ReportServer.gif" style="display:none"
width="200" height="200" />

Then, in our button's client-side onclick event or the html <form>'s
"onsubmit", we can use script to make the image or label visible:

<script language="javascript">
function ShowImage()
{
document.getElementById("imgRing").src = "Images/Ring.gif";
document.getElementById("imgRing").style.display = "";

}
</script>
<form id="form1" runat="server" onsubmit="ShowImage();">
Hope this helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Mar 10 '06 #5
I've needed to do a similar thing, but took a slightly different
approach. On the submit button, it calls a javascript function which
opens a "Please Wait" modeless dialog. In the URL of the Please Wait
window I pass the postback ID and EventArg of the button (which would be
used for the __doPostBack()) in the querystring and I pass the Window
object into the window.showModelessDialog() method similar to the
example here:
http://msdn.microsoft.com/library/de...p/author/dhtml
/reference/methods/showmodelessdialog.asp

Then I have a ContinuePostBack() method in the main page where the
submit button exists which takes the EventID and EventArg and simply
calls the __doPostBack() event. When the Please Wait window opens, it
calls the ContinuePostBack function on the main window and passes in the
EventID and EventArg from its URL. The ContinuePostBack will start the
PostBack process which after it completes the page refreshes which
clears the Please Wait modeless dialog, so you don't have to worry about
trying to close that window. I originally tried to just open the Please
Wait window then continue with the __doPostBack, but I think there was a
timing issue because the Please Wait would not always display. So I
resolved that by having the Please Wait window be the thing that called
the ContinuePostBack function... that gaurantees the window will open
before the postback starts.

I'm thinking about taking this another step by having the long process
write status messages to a session variable and having the Please Wait
window auto-refresh and read that session variable every 5 seconds or
so.

*** Sent via Developersdex http://www.developersdex.com ***
Mar 11 '06 #6
Hi;

More than I need this time but keeping this for future use.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Mike Ogden" wrote:
I've needed to do a similar thing, but took a slightly different
approach. On the submit button, it calls a javascript function which
opens a "Please Wait" modeless dialog. In the URL of the Please Wait
window I pass the postback ID and EventArg of the button (which would be
used for the __doPostBack()) in the querystring and I pass the Window
object into the window.showModelessDialog() method similar to the
example here:
http://msdn.microsoft.com/library/de...p/author/dhtml
/reference/methods/showmodelessdialog.asp

Then I have a ContinuePostBack() method in the main page where the
submit button exists which takes the EventID and EventArg and simply
calls the __doPostBack() event. When the Please Wait window opens, it
calls the ContinuePostBack function on the main window and passes in the
EventID and EventArg from its URL. The ContinuePostBack will start the
PostBack process which after it completes the page refreshes which
clears the Please Wait modeless dialog, so you don't have to worry about
trying to close that window. I originally tried to just open the Please
Wait window then continue with the __doPostBack, but I think there was a
timing issue because the Please Wait would not always display. So I
resolved that by having the Please Wait window be the thing that called
the ContinuePostBack function... that gaurantees the window will open
before the postback starts.

I'm thinking about taking this another step by having the long process
write status messages to a session variable and having the Please Wait
window auto-refresh and read that session variable every 5 seconds or
so.

*** Sent via Developersdex http://www.developersdex.com ***

Mar 11 '06 #7
that is way cool. More than I need right now but very very cool. Buying the
book!

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Juan T. Llibre" wrote:
Dave Sussman and Alex Homer wrote this pretty "staged load" page display:

http://www.daveandal.net/books/6744/...edloading.aspx

It displays progress without switching the page.

There's a link to the code at that page.
Although it was written as an ASP.NET 1.1 sample, it will work in 2.0.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Thielen" <th*****@nospam.nospam> wrote in message
news:E8**********************************@microsof t.com...
Hi;

.NET 2.0

I have a situation where when the user selects an item in a drop down list,
the code behind is called to update the values in another list on the page.
This update can take 3 - 5 seconds.

When it is complete, the same page is still displayed. What is the best way
to tell the user the page is working? I don't like the idea of switching to a
page that says "thinking..." and then going back to the page on.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com


Mar 11 '06 #8
re:
that is way cool.
Don't forget to play with all the free code they have available :

http://www.daveandal.net/download.as...=6744-code.zip

You can run all their examples online at :
http://www.daveandal.net/books/6744/samples.aspx

re:
Buying the book!

Get it new for 31.49 at :
http://www.amazon.com/exec/obidos/AS...736665-0133725

or new, starting at about $24 at :
http://www.amazon.com/gp/offer-listi...condition=all:

or used starting at $22. at the same page.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Thielen" <th*****@nospam.nospam> wrote in message
news:D5**********************************@microsof t.com... that is way cool. More than I need right now but very very cool. Buying the
book!

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Juan T. Llibre" wrote:
Dave Sussman and Alex Homer wrote this pretty "staged load" page display:

http://www.daveandal.net/books/6744/...edloading.aspx

It displays progress without switching the page.

There's a link to the code at that page.
Although it was written as an ASP.NET 1.1 sample, it will work in 2.0.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Thielen" <th*****@nospam.nospam> wrote in message
news:E8**********************************@microsof t.com...
> Hi;
>
> .NET 2.0
>
> I have a situation where when the user selects an item in a drop down list,
> the code behind is called to update the values in another list on the page.
> This update can take 3 - 5 seconds.
>
> When it is complete, the same page is still displayed. What is the best way
> to tell the user the page is working? I don't like the idea of switching to a
> page that says "thinking..." and then going back to the page on.
>
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
>


Mar 11 '06 #9

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

Similar topics

8
by: Brian Huether | last post by:
Whenever I use this, it doesn't seem to return anything. Any idea what is happening here? My webhost (ipowerweb) uses php 4.3.1. -brian
3
by: www | last post by:
Hi there, I need to calculate working days for a given period, "Date from", "Date To". Plus I want to be able to insert Public Holidays to exclude aswell. Your help will be greatly appreciated....
3
by: | last post by:
Hello, I am hoping someone else has thought about a date time calculation i need to perform. I would like to be able to calculate the number of "working minutes" between 2 dates, given my...
1
by: Jason | last post by:
I am trying to send mail via SMTP, using VB.NET on XP. I keep getting this error: "Could not access 'CDO.Message' object." (I can send mail fine via VB6, using CDONTS.) I have added a reference...
0
by: WORKING IN FAITH | last post by:
three years I LOVE You Monica More options 1 message - Collapse all WORKING IN FAITH View profile More options Nov 13, 11:29 am three years I LOVE You Monica
12
by: ssh | last post by:
function testfn(name) var tbody = document.getElementById('hellospace').getElementsByTagName('tbody'); var row = document.createElement('TR'); var cell1 = document.createElement('TD');...
2
by: Dipti Singh | last post by:
Hi, I have two asp pages. when both contain lots of coding, loops etc. if i run the first page that contain for loop for creating array of textboxes, then this page run successfully. but if...
1
by: Parsed Cheese | last post by:
After two days I am at wits end, but I am too OCD'ed to give up. Please tell me what I have got wrong because no Validation Error is being thrown. The element: "<datestamp>I should...
1
by: Claire | last post by:
Hi, either I'm going mad or is params not working anymore in VS 2005? I have function as follows public tableEquipment ReadEquipment(bool ReadImages, params Int64 RecIDs) { } if I call...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.