[Project_owners] How to set a selected text to a text field of a side bar
Brian King
brian at mozdev.org
Thu Oct 23 02:58:40 PDT 2008
Silver Surfer wrote:
> Hi Friends,
>
> I need to know about how to set a selected text to a text box in a
> sidebar after selecting a text and click a popupmenu. Code for popupmenu
> is in Overlay.xul file and when a menu item is clicked it execute a
> function in another .js file. A broadcaster is also set in the
> Overlay.xul and the sidebar is set to that broadcaster by loading (
> setting broadcasters url) another xul which has the code for sidebar. I
> can get the value of selected text but I don't know a way to set that
> value to the relevant text field of the sidebar.
See:
https://developer.mozilla.org/en/Code_snippets/Sidebar#Accessing_the_sidebar_from_a_browser.xul_script
- Brian
More information about the Project_owners
mailing list