ff-overlay.xul
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://sidebar/skin/overlay.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://sidebar/locale/overlay.dtd">
<overlay id="sidebar-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="overlay.js"/>
<script src="ff-overlay.js"/>
<script src="ff-sidebar.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="context-strings" src="chrome://contexthighlight/locale/overlay.properties"/>
</stringbundleset>
<menupopup id="viewSidebarMenu">
<menuitem key="key_openSidebar_sidebar" observes="viewSidebar_sidebar" />
</menupopup>
<keyset id="mainKeyset">
<key id="key_openSidebar_sidebar" command="viewSidebar_sidebar" key="j" modifiers="alt"/>
</keyset>
<broadcasterset id="mainBroadcasterSet">
<broadcaster id="viewSidebar_sidebar"
label="&sidebarSidebar.label;"
autoCheck="false"
type="checkbox"
group="sidebar"
sidebarurl="chrome://sidebar/content/ff-sidebar.xul"
sidebartitle="&sidebarSidebar.label;"
oncommand="toggleSidebar('viewSidebar_sidebar');" />
</broadcasterset>
</overlay>
ff-sidebar.xul
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type"text/css" ?>
<!DOCTYPE page SYSTEM "chrome://sidebar/locale/overlay.dtd">
<page id="sidebarSidebar" title="&sidebarSidebar.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="createAnnotationNode1();">
<script src="ff-sidebar.js"/>
<script type="application/x-javascript">
function createAnnotationNode1()
{
//alert("annotation called");
var treeChildrenId = document.getElementById("children_root");
setTreeChildrenId(treeChildrenId);
}
</script>
<vbox flex="1">
<!--
<label id="message" />
<iframe id="myFrame" flex="1" src="&myFrame.label;" height="300" width="200"/>
-->
<button label="Reload" oncommand="reLoad()"/>
<tree flex="1" hidecolumnpicker="true" seltype="cell" id="contacts">
<treecols>
<treecol id="sender" primary="true" label="Sender" flex="1" />
</treecols>
<treechildren id="children_root"/>
</tree>
</vbox>
</page>
I'm not able to get treechildren element "children_root" using document.getElementById("children_root");
from javascript getRequest.js
. It is returning null.
I can get the elements which are inside ff-overlay.xul (EX. I can get "stringbundleset" by using document.getElementById("stringbundleset"))
How to access the element?