Forums Register Login

how to disable a button

+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 ?
+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>
+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
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.