PDA

View Full Version : mootools form.send



nikomou
03-23-2009, 10:42 PM
Hi,

I'm using mootool's Form.Send from here: http://demos.mootools.net/Form.Send

Would anybody know how I could modify this to submit the form when a checkbox is ticked? instead of pressing the button!

Thanks

codeexploiter
03-24-2009, 04:27 AM
You can have an 'onclick' event for the checkbox, which check whether the checkbox is checked or not. If it is checked then it will submit the HTML form from it and the form.send mootool code which is in place already will perform its duty correctly. You can also remove the button from the HTML form as you don't need it.

nikomou
03-24-2009, 11:04 AM
Thanks,

Ive used

onclick="this.form.submit();"

it DOES submit the form, but results show in the whole page, not in the div