Hi,
I have a small (hopefully!) problem. I have two buttons on my web page and when button A is clicked, the code behind takes about 3 seconds to execute. While it's executing though, I don't want the user to be able to click button B. What I have found happens is that if user clicks button B while button A is still executing, the code behind button B will start executing straight after the code under A has finished, and there is no page refresh/reload in between the two executions - that is my main problem.
I have searched the web to try to find a solution but have been unsuccessful. Can anyone tell me how I can either make button B disabled in the middle of button A's code execution (so once A is clicked, disable B, refresh the page and continue with execution of code under A), or end all code execution once the code under A has finished (ie do not go on to code under button B if it was pressed)?
Thanks for your help - greately appreciate it,
Jo 7 2467
Does A always get pressed before B? If so, then open the page with B
disabled or hidden, and enable/unhide it in A's code.
--Mary
On Tue, 18 May 2004 19:36:02 -0700, "Jo"
<an*******@disc ussions.microso ft.com> wrote: Hi,
I have a small (hopefully!) problem. I have two buttons on my web page and when button A is clicked, the code behind takes about 3 seconds to execute. While it's executing though, I don't want the user to be able to click button B. What I have found happens is that if user clicks button B while button A is still executing, the code behind button B will start executing straight after the code under A has finished, and there is no page refresh/reload in between the two executions - that is my main problem. I have searched the web to try to find a solution but have been unsuccessful. Can anyone tell me how I can either make button B disabled in the middle of button A's code execution (so once A is clicked, disable B, refresh the page and continue with execution of code under A), or end all code execution once the code under A has finished (ie do not go on to code under button B if it was pressed)?
Thanks for your help - greately appreciate it,
Jo
I wish it was that easy - B can (and in most cases will) be pressed before A. It could be pressed 10 times before A is pressed.
----- Mary Chipman wrote: -----
Does A always get pressed before B? If so, then open the page with B
disabled or hidden, and enable/unhide it in A's code.
--Mary
On Tue, 18 May 2004 19:36:02 -0700, "Jo"
<an*******@disc ussions.microso ft.com> wrote: Hi,I have a small (hopefully!) problem. I have two buttons on my web page and when button A is clicked, the code behind takes about 3 seconds to execute. While it's executing though, I don't want the user to be able to click button B. What I have found happens is that if user clicks button B while button A is still executing, the code behind button B will start executing straight after the code under A has finished, and there is no page refresh/reload in between the two executions - that is my main problem. I have searched the web to try to find a solution but have been unsuccessful. Can anyone tell me how I can either make button B disabled in the middle of button A's code execution (so once A is clicked, disable B, refresh the page and continue with execution of code under A), or end all code execution once the code under A has finished (ie do not go on to code under button B if it was pressed)?Thanks for your help - greately appreciate it, Jo
Unfortunately, the code has to complete before the refreshed page is
returned to the user. Perhaps you could create additional controls so
that the application flows more smoothly? It's hard to visualize
without seeing it and understanding the process, but you probably need
to re-design the UI to take into account your workflow.
--Mary
On Wed, 19 May 2004 16:11:02 -0700, "Jo"
<an*******@disc ussions.microso ft.com> wrote: I wish it was that easy - B can (and in most cases will) be pressed before A. It could be pressed 10 times before A is pressed. ----- Mary Chipman wrote: -----
Does A always get pressed before B? If so, then open the page with B disabled or hidden, and enable/unhide it in A's code.
--Mary
On Tue, 18 May 2004 19:36:02 -0700, "Jo" <an*******@disc ussions.microso ft.com> wrote:
>Hi, >>I have a small (hopefully!) problem. I have two buttons on my web page and when button A is clicked, the code behind takes about 3 seconds to execute. While it's executing though, I don't want the user to be able to click button B. What I have found happens is that if user clicks button B while button A is still executing, the code behind button B will start executing straight after the code under A has finished, and there is no page refresh/reload in between the two executions - that is my main problem. >I have searched the web to try to find a solution but have been unsuccessful. Can anyone tell me how I can either make button B disabled in the middle of button A's code execution (so once A is clicked, disable B, refresh the page and continue with execution of code under A), or end all code execution once the code under A has finished (ie do not go on to code under button B if it was pressed)? >>Thanks for your help - greately appreciate it, >>Jo
So there's no way that in my code (at the end of a button click function) I can force the page to refresh without executing any further code (which is the next button click waiting to be executed)
When you click the button, there's only 1 round trip to the server,
where the code is executed, and the refreshed page returned. What you
are asking would require two round trips, which is why I suggested
re-examining your workflow and UI to account for this.
--Mary
On Thu, 20 May 2004 20:01:05 -0700, "Jo"
<an*******@disc ussions.microso ft.com> wrote: So there's no way that in my code (at the end of a button click function) I can force the page to refresh without executing any further code (which is the next button click waiting to be executed)?
Thanks for your replies and your patience :-)
If you look at the Hotmail website (once you log in), they are doing exactly what I'd like to do. Ie when you press a button on that page, for example NewMessage, the page then begins to load, and you are unable to press any buttons on the page while it's loading - as if they were all disabled. This is what I need to achieve. Any idea how they might be doing that?
Not being unfamiliar with Hotmail internals, I would guess that
they're running client-side script.
--Mary
On Mon, 24 May 2004 19:56:04 -0700, "Jo"
<an*******@disc ussions.microso ft.com> wrote: If you look at the Hotmail website (once you log in), they are doing exactly what I'd like to do. Ie when you press a button on that page, for example NewMessage, the page then begins to load, and you are unable to press any buttons on the page while it's loading - as if they were all disabled. This is what I need to achieve. Any idea how they might be doing that? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Shawn Milo |
last post by:
I put this together yesterday, and I thought I'd share it.
It works in both IE and Mozilla Firefox. I posted something
similar to this months back, but it was much longer, and only
worked in IE.
Shawn
function searchList(inText, drpBox){
var iCount;
|
by: C# Learner |
last post by:
In the following two code blocks, DoSomethingUseful throws AnException,
while neither of the other called methods throw any exceptions. Which of
the code blocks is better (in terms of readability, maintainability, etc.),
in your opinions?
A
{
Start();
try
{
|
by: ori |
last post by:
Hi,
I'm facing a problem when trying to continue normal execution flow
within a HttpHandler ProcessRequest method. In my application we
currently have a custom HttpHandler registered which validates a user
against some Authentication method and then allows him to continue his
request if successfully authenticated or denies him access if not. We
use a handler to do this authentication and we'd like to continue
normal execution if...
|
by: Jo |
last post by:
Hi,
I have a small (hopefully!) problem. I have two buttons on my web page and when button A is clicked, the code behind takes about 3 seconds to execute. While it's executing though, I don't want the user to be able to click button B. What I have found happens is that if user clicks button B while button A is still executing, the code behind button B will start executing straight after the code under A has finished, and there is no page...
|
by: Lorenzo |
last post by:
I'm trying to figure out the webservices architecture for library that
we currently use as a monolithic component.
Every execution is expressed by a call like this one
public static IList executeIt(someArguments)...
To be completed teh executeIt method can take up to 15 seconds, so I
need to use asynchronous calls.
| |
by: Sabiyur |
last post by:
Hi All,
I don't know whether this is the right forum to post this
question.
If not, Please forgive me.
I want to write my own tool which can trace the code execution (print
the sequence of function execution into a file).
But I cannot change the source code. (i.e.) I cannot write some Trace
macros
into source code.
|
by: pauldepstein |
last post by:
Is there any standard c++ command for halting execution? The nearest
equivalent I can find is assert(false); However this only works in
debug mode.
I'm trying to examine the execution flow of my program but an issue is
that debug mode is enormously slow, so setting breakpoints is
enormously slow. For speed, I want to do as much as possible in
release mode.
It occurs to me that, if I knew a c++ command for halting execution, I
|
by: Ethender |
last post by:
I am using the following function to send execution details of the process-flow. This process-flow is having 20 mappings. This is working fine.
The cIient requirment is to pass email-IDs from a back-end table(sam_mail_notification) with columns(smtp, port, from_address and to_address), right now the function is working on static(constant) values, Can I get the modified function from you.
--initialize variables here
-- main body...
|
by: Campy Happer |
last post by:
Hello all,
I would like to bring to your attention a concept
and a term for it that I think is long overdue.
But first: In the bad old days of programming,
before subroutines were even available,
people used to write "spaghetti code", which
was an unreadable, unmaintainable mess of
"goto" statements.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |