By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 2,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

cool submit button switching when pressed

P: n/a
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
Share this Question
Share on Google+
11 Replies


P: n/a
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

P: n/a
*** 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

P: n/a

"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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
*** 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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.