TheVeee
asked on
Disable a button
Need when the user clicks the button to disable it on a JSP. Currenlty users are clicking on below button code and not waiting for the results.. Then they get impatient and keep clicking over and over submitting multiple requests...
<input type="submit" value="Submit Query">
Our archictecture is pretty easy because it never returns to this page so I dont need a boolean to check if on or off... just think I need a on click event...
Thanks for the help in advance....
<input type="submit" value="Submit Query">
Our archictecture is pretty easy because it never returns to this page so I dont need a boolean to check if on or off... just think I need a on click event...
Thanks for the help in advance....
<input type="submit" value="Submit Query" onClick="this.disabled=tru e">
ASKER
ok, it does disable the button, but my form doesnt do the post now to the servlet.. it just hangs there...
I have one jsp which has to includes the header and the footer jsp. The footer contains the new on click event that does disable the button, but it doesnt do the form post now...
C.jsp has the <input type="submit" value="Submit Query" onClick="this.disabled=tru e">
A.jsp has header info
B.jsp contains C and A as includes
I have one jsp which has to includes the header and the footer jsp. The footer contains the new on click event that does disable the button, but it doesnt do the form post now...
C.jsp has the <input type="submit" value="Submit Query" onClick="this.disabled=tru
A.jsp has header info
B.jsp contains C and A as includes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In XHTML, disabled = true is invalid. That format is deprecated and theoretically, support for it is going to die out. If you'd like to maintain forward compatability, you should use element.disabled = 'disabled';
TNC
TNC