You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by th...@webmd.net on 2002/03/06 02:32:16 UTC

how do you enable/disable a text field based on a checkbox?

With the given html tags for the struts and taglibs and such, is there an
easy way to enable a corresponding textfield when you check the box?
Is there an easy way to disable the corresponding textfield when you
uncheck the checkbox as well as clear the text field.

thanks,
Theron


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: how do you enable/disable a text field based on a checkbox?

Posted by Arron Bates <ar...@pacific.net.au>.
JavaScript will be your only way, working off the checkBox's onclick 
handler. You could use the onchange handler but it's implementation is a 
little fuzzy across browsers. Use onlick, get the state of the checkbox, 
and do your thing with the other field.

Arron.

theron.kousek@webmd.net wrote:

>With the given html tags for the struts and taglibs and such, is there an
>easy way to enable a corresponding textfield when you check the box?
>Is there an easy way to disable the corresponding textfield when you
>uncheck the checkbox as well as clear the text field.
>
>thanks,
>Theron
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>