I have a form (in a JSP file) with:
A textarea named textarea1.
A button type submit.
I do this:
... // My form.
String text=request.getParameter("textarea1");
if(text!=null){
... // ????
... // Code.
... // ????
}
I need to disable my button submit and enable it after (see the comments '????'). Another valid option for me (I think) is blocking and unblocking all my form (textarea and button). How can I do these (disable/enable the button and block/unblock the form)?
Solved: :-)
I've got this link:
In a line:
My style is necessary (initially this button has to be hidden).
My sequence:
Button initially hidden (0 characters in my textarea).
I write a character in my textarea.
It appears the button 'Executar' (in English, 'Run').
I click 'Run'. With a single click (always)...
This button (disabled) tells me 'Running...'.
When the execution finishes the button 'Run' disappears, and it reappears if I want to modify the textarea (has some character).
It works with:
IE 6 and 9.
Mozilla Firefox 9.0.1 and 37.0.
Chrome 41.0.
try this you can use this code for enable and disable button call myfunction() and myfunction1() where you want to enable and disable button.