Subject:
|
Disabling HTML form button if any changes made to an edit box?
|
Newsgroups:
|
lugnet.publish.html
|
Date:
|
Mon, 2 Jun 2003 05:20:56 GMT
|
Viewed:
|
2119 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
This must be easy with JavaScript, right?--
Id like to disable a submit button (turn it gray out and non-clickable) in an
HTML form if the user changes any data in an editable text field within the
form. The editable text fields are of type TYPE=TEXT and TEXTAREA.
Would this be as simple as adding an onChanged= event handler in the text input
tags and calling some JavaScript code to set a disabled bit on the TYPE=SUBMIT button? Is it cross-platform reliable assuming Netscape 4.7 and up
and MSIE 5.0 and up?
--Todd
p.s. The application here is that I want to prevent accidental posting of
messages where the user has forgotten to preview the message. After Preview is
clicked and the preview is displayed, the Post button should be enabled. But if
any changes are made, then the Post button should be immediately disabled.
|
|
Message has 1 Reply:
19 Messages in This Thread: ![You are here](/news/here.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Dan Boger (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/246.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Todd Lehman (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Dan Boger (2-Jun-03 to lugnet.publish.html)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Brian H. Nielsen (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/246.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Dan Boger (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Brian H. Nielsen (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Todd Lehman (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Brian H. Nielsen (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Dan Boger (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Todd Lehman (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Brian H. Nielsen (3-Jun-03 to lugnet.publish.html)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Todd Lehman (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/246.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Brian H. Nielsen (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Todd Lehman (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/246.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Leonard Hoffman (2-Jun-03 to lugnet.publish.html)](/news/x.gif) ![](/news/46.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Todd Lehman (2-Jun-03 to lugnet.publish.html)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -Brian H. Nielsen (3-Jun-03 to lugnet.publish.html)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Disabling HTML form button if any changes made to an edit box? -William R. Ward (2-Jun-03 to lugnet.publish.html)](/news/x.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|