Talk:Greasemonkey Hacks/Web Forms

From WikiContent

Revision as of 18:14, 25 May 2009 by Cmorrisontp (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Many, if not all, of the descriptions of how to hook submissions from forms are wrong. The following code, simply does not work in FF 3.x:

real_submit = HTMLFormElement.prototype.submit;
HTMLFormElement.prototype.submit = handleSubmit;
window.addEventListener('submit', handleSubmit, true);

It fails with an error in regards to the "prototype" property.

Is there a known fix for this?

Regards,

Craig

Personal tools