Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
JSP
how to disable a button
ben oliver
,
Ranch Hand
Jul 20, 2006 00:15:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
in my
JSP
page I am supposed to have "submit", "cancel" button. But sometimes I only want one of them and disable the other one, what's the good and easy way to do that ?
Christophe Verré
,
Sheriff
staff
Jul 20, 2006 00:52:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
You could use JSTL' <c:if> and set the "disabled" attribute to your button.
<c:if test="${your_test_here}">disabled<c:if>
sundaramoorthi thangavel
,
Greenhorn
Jul 20, 2006 02:00:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
can you explain your scenario a little bit?
If you want to disable the button while the form is displayed, check the condition in JSP and put 'disabled' property in <input> tag.
If you want to disable when an event is triggered, like click event or something, you can use javascript
Post by:
autobot
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
This thread has been viewed 2378 times.
Similar Threads
Disabling form elements on a table row
assign values to form elements dynamically?
How to disable IE back button.
how to disable the submit button
ava script for diable/enable textbox and options with the help of radio button
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:49:30
.