setting button enable / disable through JSP

Hi, I want to set form button's enable / disable properties depending upon a boolean variable of JSP.I tried it using javascript too but it's not working. Don't know how to achieve it using JSP code.Can somebody help me?Thanks
[264 byte] By [csp_javaa] at [2007-11-26 14:59:05]
# 1
JSP is server-side codewhat you want to do is client-sideuse javascript
CarrieHunta at 2007-7-8 8:47:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hey Thanks.I tried to do that with javascript but nothing is happening.I assigned the JSp boolen variable to a hidden field .I used that hiddedn form element in javascript and tried to disable / enable the button but nothing is happening.Any other solutions?
csp_javaa at 2007-7-8 8:47:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Can you paste your code-snippet that you have tried so far?

If you are doing this with XHTML, you could do it like this JSTL code inside JSP:

<c:set var="disableButton" value=""/>

<c:if test=${someValue == true}>

<c:set var="disableButton" value="disabled='disabled'"/>

</c:if>

<input type="submit" value="submit" ${disabledButton} />

I hope that's what you are looking for?

appy77a at 2007-7-8 8:47:53 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...