By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

Copy Form's onSubmit() Handlers and Add More

P: n/a
I write a JS library component which is applied to every form on a
webpage. The component does something before it submits the form. Now,
let's say user has his own onSubmit() handlers returning true or
false. I want to find a way to add my component's "onsubmit" event to
the form without overwriting user-defined onSubmit() handlers or
onsubmit events.
Is there a really good way of doing this?

The problem I've come across was if I add onsubmit event to the form
which returns false (form should not be submitted), the user-defined
onSubmit() handlers or onsubmit events may return true and submit the
form. I want to prevent it with logic:

....if any onsubmit handlers/events allow form submission but my
component does not allow submission, then do NOT submit the form.

Thanks.
Jul 28 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
vunet wrote:
...if any onsubmit handlers/events allow form submission but my
component does not allow submission, then do NOT submit the form.
<news:c7**********************************@f63g200 0hsf.googlegroups.com>

Note the date.
HTH

PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Jul 28 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.