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

How can I alter button value when pressed in ?

I have a button
<input type="button" value="Get data">

When it is clicked a database is accessed and the data is eventually
displayed on the screen.

While the data is being retrieved the button is displayed in its
"pressed in" state.
When the data arrives and is displayed the button pops out to its
normal "unpressed" state.

While the data is being retrieved I would like to alter the appearance
of the button. Ideally I would like to alter its color but more
importantly I would like to alter its value to something like
"Retrieving Data". My problem is I cannot find the button property
corresponding to its "pressed in" state or the events corresponding to
its alteration in appearance.

I guess I could do something onClick but then I am stuck without
knowing what event occurs when the button pops back to its"unpressed"
state.

Can someone enlighten me?
Thanks
N
Jul 27 '07 #1
3 1734
On Jul 27, 3:38 pm, noddy <no...@toyland.comwrote:
I have a button
<input type="button" value="Get data">

When it is clicked a database is accessed and the data is eventually
displayed on the screen.

While the data is being retrieved the button is displayed in its
"pressed in" state.
When the data arrives and is displayed the button pops out to its
normal "unpressed" state.

While the data is being retrieved I would like to alter the appearance
of the button. Ideally I would like to alter its color but more
importantly I would like to alter its value to something like
"Retrieving Data". My problem is I cannot find the button property
corresponding to its "pressed in" state or the events corresponding to
its alteration in appearance.

I guess I could do something onClick but then I am stuck without
knowing what event occurs when the button pops back to its"unpressed"
state.

Can someone enlighten me?
Thanks
N

As far as I know there is no state on a button called "Pressed In" or
anything similar.
I do however got a proposed solution for you:

1. Disable the button after the user clicked on it, and also change
the value of the button if you like
2. When the data arrived (I assume from AJAX), enable the button again

Hope that helps

Hendri Kurniawan

Jul 27 '07 #2
On Fri, 27 Jul 2007 06:14:25 -0000, Hendri Kurniawan
<hc*********@gmail.comwrote:
>On Jul 27, 3:38 pm, noddy <no...@toyland.comwrote:
>I have a button
<input type="button" value="Get data">

When it is clicked a database is accessed and the data is eventually
displayed on the screen.

While the data is being retrieved the button is displayed in its
"pressed in" state.
When the data arrives and is displayed the button pops out to its
normal "unpressed" state.

While the data is being retrieved I would like to alter the appearance
of the button. Ideally I would like to alter its color but more
importantly I would like to alter its value to something like
"Retrieving Data". My problem is I cannot find the button property
corresponding to its "pressed in" state or the events corresponding to
its alteration in appearance.

I guess I could do something onClick but then I am stuck without
knowing what event occurs when the button pops back to its"unpressed"
state.

Can someone enlighten me?
Thanks
N


As far as I know there is no state on a button called "Pressed In" or
anything similar.
I do however got a proposed solution for you:

1. Disable the button after the user clicked on it, and also change
the value of the button if you like
2. When the data arrived (I assume from AJAX), enable the button again

Hope that helps

Hendri Kurniawan
Thanks for the suggestion.

In fact I have discovered I was making a problem where there was none.
The on MouseDown and on MouseUp properties correspond to the states I
was referring to.

N
Jul 27 '07 #3
On Fri, 27 Jul 2007 06:14:25 -0000, Hendri Kurniawan
<hc*********@gmail.comwrote:
>On Jul 27, 3:38 pm, noddy <no...@toyland.comwrote:
>I have a button
<input type="button" value="Get data">

When it is clicked a database is accessed and the data is eventually
displayed on the screen.

While the data is being retrieved the button is displayed in its
"pressed in" state.
When the data arrives and is displayed the button pops out to its
normal "unpressed" state.

While the data is being retrieved I would like to alter the appearance
of the button. Ideally I would like to alter its color but more
importantly I would like to alter its value to something like
"Retrieving Data". My problem is I cannot find the button property
corresponding to its "pressed in" state or the events corresponding to
its alteration in appearance.

I guess I could do something onClick but then I am stuck without
knowing what event occurs when the button pops back to its"unpressed"
state.

Can someone enlighten me?
Thanks
N


As far as I know there is no state on a button called "Pressed In" or
anything similar.
I do however got a proposed solution for you:

1. Disable the button after the user clicked on it, and also change
the value of the button if you like
2. When the data arrived (I assume from AJAX), enable the button again

Hope that helps

Hendri Kurniawan
Thanks for the suggestion.

In fact I have discovered I was making a problem where there was none.
The on MouseDown and on MouseUp event handlers correspond to the
states I was referring to.

N
Jul 27 '07 #4

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

Similar topics

2
by: jb | last post by:
Hello, I need to know which button was pressed in the submit , i tried reading the vaule of submit it the validateDate function but it returns 'undefined' value ; I do this in asp all the time, Not...
18
by: jrhoads23 | last post by:
Hello, I am trying to find a way to tell if an .NET windows forms Button (System.Windows.Forms.Button) is "depressed" (pushed down). For my application, I can not use a check box control set to...
5
by: Girish | last post by:
I have TWO submit buttons of type IMAGE on my asp form. This renders as <input type="image">. I need to be able to eble the ENTER button for both buttons. Yes, I know that for the input type...
7
by: Miguel Dias Moura | last post by:
Hello, I am working in ASP.net / VB with Access Database. i have a Multipage in my web site with the Submit button as the last button. When the Submit button is pressed i want the form...
2
by: Krista Lemieux | last post by:
Hello, In my form I have a button, and the button_Click function (which gets called when the button is clicked). However the functionality that I have in the button_Click function, needs to be...
7
by: Jimmy Jazz | last post by:
Hi, I have created a control with some buttons an alphabet. When one of these buttons are pressed it posts back and in the postback event for the button pressed a list of tems is created with a...
1
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the...
3
by: Daniel | last post by:
Hi all, I am using .NET 1.1. I have a form with a cancel button, something like this: <form method="post"....> <input type="submit" value="Submit"> <input type="submit" value="Cancel"...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
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,...
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,...

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.