473,386 Members | 1,958 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,386 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 1733
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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...
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...

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.