Alright, thx Brian, I'll try it out.

On May 6, 11:41 am, brian <[email protected]> wrote:
> On Wed, May 6, 2009 at 11:17 AM, Stu <[email protected]> wrote:
>
> > Hi All,
>
> > I'd like to add an onChange event for a checkbox, basically this would
> > trigger a $form->submit.  The radio Button and Select have the
> > $attributes parameter which allows this but unfortunately for me, it's
> > not the case for the checkbox.
>
> > I also tried to do it in html:
> > <input type="checkbox" id="foo" onClick="updateContent()">
>
> > It does execute the javascript, yet I can't find a way to refresh my
> > data from the javascript (Is the a way to generate a form submit from
> > javascript?).
>
> If you change your handler to updateContent(this) and modify your function to:
>
> function updateContent(el) {
>
> ... you can then do el.form.submit(); Here, 'el' and 'this' refer to
> the checkbox.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to