[Greasemonkey] GM_xmlhttpRequest in an onsubmit event

Aaron Boodman zboogs at gmail.com
Tue Oct 10 13:38:42 PDT 2006


On 10/10/06, s g <junkvendoremail at yahoo.com> wrote:
> will the GM_xmlhttpRequest complete
> always even though the result of the
> submit is to go to another page.

I'm not sure. The safest thing would be to cancel the submit and then
re-run it later.

So, like, return false to the onsubmit handler initially. Then after
your GM_xmlhttprequest is completed, call submit() again.

> also is there a way to wait for the
> result of the GM_xmlhttpRequest call -
> it seems to be asych.

No, there isn't.

- a


More information about the Greasemonkey mailing list