Talk:Greasemonkey Hacks/Web Forms

From WikiContent

(Difference between revisions)
Jump to: navigation, search
(New page: 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;<...)
Current revision (18:23, 25 May 2009) (edit) (undo)
 
Line 3: Line 3:
real_submit = HTMLFormElement.prototype.submit;<br>
real_submit = HTMLFormElement.prototype.submit;<br>
HTMLFormElement.prototype.submit = handleSubmit;<br>
HTMLFormElement.prototype.submit = handleSubmit;<br>
-
window.addEventListener('submit', handleSubmit, true);
 
It fails with an error in regards to the "prototype" property.
It fails with an error in regards to the "prototype" property.

Current revision

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;

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

Is there a known fix for this?

Regards,

Craig

Personal tools