Thank Eric,
is it possible to add some other codes like php or html code to a page too ?

On Jan 10, 2008 4:49 PM, Eric H. Jung <[EMAIL PROTECTED]> wrote:

>
> --- joe ertaba <[EMAIL PROTECTED]> wrote:
>
> > hi,
> >
> > i need to add some javascript function to some especial pages;
> > i want to for example show a alert('...') when user click on especial
> link
> > on page
>
> I assume you mean from an extension and not on your project page :)
> If so, then wait for the page to load, get the document content, and:
>
> var s = document.createElement("script");
> s.setAttribute("type", "text/javascript");
> s.appendChild(document.createTextNode("alert('hello world');"));
> document.getElementsByTagName["head"][0].appendChild(s); // won't work if
> document has no HEAD
>
>
> _______________________________________________
> Project_owners mailing list
> [email protected]
> https://www.mozdev.org/mailman/listinfo/project_owners
>
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to