473,385 Members | 1,901 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.

cool submit button switching when pressed

I saw it somewhere the other day, and just saw it again on the pear.php.net
search page. When you click the "submit" button, it switches to a grayed
out "processing" button. I glanced at the source, but I don't see anything
special. Anyone know how this is done?

Thanks,
-G
Jul 17 '05 #1
11 5803
On Mon, 01 Dec 2003 00:39:19 GMT, Greg Bryant <br**********@yahoo.com> wrote:
I saw it somewhere the other day, and just saw it again on the pear.php.net
search page. When you click the "submit" button, it switches to a grayed
out "processing" button. I glanced at the source, but I don't see anything
special. Anyone know how this is done?


JavaScript.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #2
*** Greg Bryant wrote/escribió (Mon, 01 Dec 2003 00:39:19 GMT):
I saw it somewhere the other day, and just saw it again on the pear.php.net
search page. When you click the "submit" button, it switches to a grayed
out "processing" button. I glanced at the source, but I don't see anything
special. Anyone know how this is done?


It's probably using some good old JavaScript to change the "disabled"
attribute of the button. Check source code again and you'll find it.
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #3

"Greg Bryant" <br**********@yahoo.com> schrieb im Newsbeitrag
news:Xn**********************************@199.45.4 9.11...
I saw it somewhere the other day, and just saw it again on the pear.php.net search page. When you click the "submit" button, it switches to a grayed
out "processing" button. I glanced at the source, but I don't see anything special. Anyone know how this is done?

Thanks,
-G


Try this:

<input type="Submit" name="submit" value="Jetzt anmelden"
OnClick="this.disabled=true; this.form.submit();">

to change text add "this.value='processing';"
Ingo (Germany)
Jul 17 '05 #4
"Ingo" <Ho********@gmx.de> wrote in
news:bq*************@news.t-online.com:

"Greg Bryant" <br**********@yahoo.com> schrieb im Newsbeitrag
news:Xn**********************************@199.45.4 9.11...
I saw it somewhere the other day, and just saw it again on the

pear.php.net
search page. When you click the "submit" button, it switches to a
grayed out "processing" button. I glanced at the source, but I don't
see

anything
special. Anyone know how this is done?

Thanks,
-G


Try this:

<input type="Submit" name="submit" value="Jetzt anmelden"
OnClick="this.disabled=true; this.form.submit();">

to change text add "this.value='processing';"
Ingo (Germany)


Thanks, I figured it had to be something like that, but the source for
the page (found at http://pear.php.net/package-search.php ) only has
<input type="submit" name="submitButton" value="Search" />

Enjoy,
-G
Jul 17 '05 #5
On Mon, 01 Dec 2003 23:27:36 GMT, Greg Bryant <br**********@yahoo.com> wrote:
Thanks, I figured it had to be something like that, but the source for
the page (found at http://pear.php.net/package-search.php ) only has
<input type="submit" name="submitButton" value="Search" />


Look at the <form> element.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #6
Andy Hassall <an**@andyh.co.uk> wrote in
news:tu********************************@4ax.com:
On Mon, 01 Dec 2003 23:27:36 GMT, Greg Bryant <br**********@yahoo.com>
wrote:
Thanks, I figured it had to be something like that, but the source for
the page (found at http://pear.php.net/package-search.php ) only has
<input type="submit" name="submitButton" value="Search" />


Look at the <form> element.


Ah - that's it. Learning all the time - good stuff. Thanks!

-Greg
Jul 17 '05 #7
Regarding this well-known quote, often attributed to Ingo's famous "Mon, 1
Dec 2003 21:55:57 +0100" speech:
"Greg Bryant" <br**********@yahoo.com> schrieb im Newsbeitrag
news:Xn**********************************@199.45.4 9.11...
I saw it somewhere the other day, and just saw it again on the

pear.php.net
search page. When you click the "submit" button, it switches to a grayed
out "processing" button. I glanced at the source, but I don't see

anything
special. Anyone know how this is done?

Thanks,
-G


Try this:

<input type="Submit" name="submit" value="Jetzt anmelden"
OnClick="this.disabled=true; this.form.submit();">

to change text add "this.value='processing';"
Ingo (Germany)


Is the "disabled" property standards-compliant? I thought you had to use
CSS/DHTML JavaScript to do that (which is, BTW, a more versatile way,
although somewhat more difficult.)

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #8
*** FLEB wrote/escribió (Wed, 3 Dec 2003 02:51:21 -0500):
OnClick="this.disabled=true; this.form.submit();">
Is the "disabled" property standards-compliant? I thought you had to use
CSS/DHTML JavaScript to do that


I thought DHTML was using JavaScript to change HTML... :-?
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #9
Regarding this well-known quote, often attributed to Alvaro G Vicario's
famous "Wed, 3 Dec 2003 11:02:08 +0100" speech:
*** FLEB wrote/escribió (Wed, 3 Dec 2003 02:51:21 -0500):
OnClick="this.disabled=true; this.form.submit();">

Is the "disabled" property standards-compliant? I thought you had to use
CSS/DHTML JavaScript to do that


I thought DHTML was using JavaScript to change HTML... :-?
--


Yes, it is, but I explicitly mentioned JavaScript for clarity.

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #10
Greg Bryant <br**********@yahoo.com> wrote or quoted:
"Ingo" <Ho********@gmx.de> wrote in

Try this:

<input type="Submit" name="submit" value="Jetzt anmelden"
OnClick="this.disabled=true; this.form.submit();">

to change text add "this.value='processing';"


Thanks, I figured it had to be something like that, but the source for
the page (found at http://pear.php.net/package-search.php ) only has
<input type="submit" name="submitButton" value="Search" />


No - there are two forms on that page - and the other one reads:

<form action="/package-search.php" method="get" name="search_form"
onsubmit="validate_form()">

The greying is done in the validate_form() method.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #11
FLEB <so*********@mmers.and.evil.ones.will.bow-down-to.us> wrote or quoted:
Regarding this well-known quote, often attributed to Alvaro G Vicario's
famous "Wed, 3 Dec 2003 11:02:08 +0100" speech:
*** FLEB wrote/escribió (Wed, 3 Dec 2003 02:51:21 -0500):
Is the "disabled" property standards-compliant? I thought you had to use
CSS/DHTML JavaScript to do that


I thought DHTML was using JavaScript to change HTML... :-?


Yes, it is, but I explicitly mentioned JavaScript for clarity.


You are asking whether there are DHTML/CSS/JavaScript standards,
and if they support the "disabled" flag?

I think the answer it "yes".

Certainly, the page in question works in IE, Mozilla and Opera.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #12

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...
8
by: Syed Ali | last post by:
Hello, I have 1 HTML form with 4 submit buttons and 10 textfield entry areas. If submit button1 is pressed I need to make sure that all 10 textfield entries have been filled before submitting...
15
by: Mattia | last post by:
Hi! I have a <form> that can be submitted thruogh three buttons and I need to tell witch one was pressed when the form was submitted. I now do it with 3 <input type="submit" name="..."...
15
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and...
6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
4
by: actionwoman63 | last post by:
Dear all I need to be able to check which one out of two submit buttons within the same form was pressed in a javascript function prior to form submission. And before I get flamed for not...
3
by: Arun K | last post by:
Hi, I am creating a simple .aspx page to add some fields with validation. I have used different .NET validations like REquiredFieldValidator, RegularExpressionValidator and showed the summary...
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: 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
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.