PDA

View Full Version : Spring checkbox can i use onClick?



javareview
Oct 2nd, 2007, 12:12 AM
I am using a Springs checkbox and the system is not letting me add the OnClick funcation. does anyone know a way around this

jglynn
Oct 2nd, 2007, 10:13 AM
The spring form tags support all html events (http://www.springframework.org/docs/reference/spring-form.tld.html#spring-form.tld.checkbox) and attributes per the XHTML-1.0-Strict specification.


<form:checkbox path="blah" onclick="alert('yay!');"/>

fyi -- it may be case sensitive, so 'OnClick' may not register.

javareview
Oct 2nd, 2007, 11:50 AM
thanks, it worked!!

it was a upper case issue