[Project_owners] On Page Load

joe ertaba belaviyo at gmail.com
Thu Jul 12 05:00:15 PDT 2007


Hi eric

is it possible to do some process on aSubject without knowing its tab?

      aSubject.QueryInterface(Components.interfaces.nsIHttpChannel);
      var uri = aSubject.URI.asciiSpec;



for example is it possible to change uri   ?

On 7/12/07, eric.jung at yahoo.com <eric.jung at yahoo.com> wrote:
>
> I've never been able to correlate tabs with URLs retrieved from observers
> (and, for that matter, progress listeners). That doesn't mean there isn't a
> way do it; I just don't know how. Maybe someone else on the list does...
>
>
> ----- Original Message ----
> From: joe ertaba <belaviyo at gmail.com>
> To: Mozdev Project Owners List <project_owners at mozdev.org>
> Sent: Thursday, July 12, 2007 3:56:55 AM
> Subject: Re: [Project_owners] On Page Load
>
> Tnx Eric
>
> it works great but now the problem is how to find the tab?
>
>
>     var num = gBrowser.browsers.length;
>     for (var i = 0; i < num; i++)
>     {
>         var b = gBrowser.getBrowserAtIndex(i);
> .....
>     }
>
> it seem that b.currentURI.spec does not update when http-on-modify-request
> sent !
>
> so how can i find the tab which want to send data ?
>
>
> On 7/12/07, eric.jung at yahoo.com <eric.jung at yahoo.com> wrote:
> >
> > Hi Joe,
> >
> > You can observe the http-on-modify-request notification to be notified
> > before any data is sent to a server.
> >
> > http://developer.mozilla.org/en/docs/Observer_Notifications#HTTP_requests
> >
> >
> >
> > ----- Original Message ----
> > From: joe ertaba < belaviyo at gmail.com>
> > To: Mozdev Project Owners List <project_owners at mozdev.org>
> > Sent: Wednesday, July 11, 2007 5:03:32 PM
> > Subject: [Project_owners] On Page Load
> >
> > hi
> >
> > i have found
> > http://developer.mozilla.org/en/docs/Code_snippets:On_page_load for
> > applying listener onpageload
> >
> > but it seems that it doesnt send alert before any data send to server
> >
> > is there any code that fire before any communication with server. i want
> > to filter before url send to server.
> > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org
> > http://mozdev.org/mailman/listinfo/project_owners
> >
> >
> > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org
> > http://mozdev.org/mailman/listinfo/project_owners
> >
> >
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070712/2c4b46f2/attachment-0001.html 


More information about the Project_owners mailing list