[Project_owners] [OT] Some help needed

eric.jung at yahoo.com eric.jung at yahoo.com
Tue Feb 13 13:35:14 PST 2007


"How can I only check the form that originated the POST request I'm working on? I have not found any way to obtain any kind of information, apart from the request's itself, by using the subject the observer services provides me."

Neither have I. If you figure that out, I'd be very interested in learning it. Specifically, I've never found a way to correlate requests to a browser/window/tab/document.

The best I can suggest is that you add your own onsubmit event handler (in your extension) to all forms as pages load. Then, when a form submits, your event handler can assign a custom attribute to the <form/> element (i.e., submit event target source). In the request observer, you enumerate all forms, looking for forms with your custom attribute. However, this approach is non-deterministic: two or more forms may submit simultaneously with the same action. You have no way to differentiate between them in the request observer.

Can I ask what you're trying to do with the form in the request observer? Maybe there's another way to get at the same goal.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070213/5361ea1a/attachment.html 


More information about the Project_owners mailing list