Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Enable and disable an image button in JSP page

807603Feb 22 2008 — edited Feb 22 2008
Hi

I am trying to enable and disable an image button based on some condition in my JSP page. I am using following code. Using my code functionality is working fine. I mean when it disable it does not do any thing. But the problem is when it is disabled from the browser it shows that enable. User can click on it but it does not do any thing. My requirement is that from the browser it should display disabled. User can not click on it.

Can any one help me?
Thank you very much for your help.
<%if(condition){%>
										
<html:image property="XXX" src="XXX.gif" onclick="YYY(); return false;" /> &nbsp;
<%}else{%>
										
<html:image property="XXX" src="XXX.gif" disabled="true" onclick="YYY(); return false;" /> &nbsp;
<%}%>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2008
Added on Feb 22 2008
6 comments
2,538 views