Can u plz find the bug in the code ??
Later I added a small piece of code to the javascript file and it showed 3...
Where's the bug in the code ??
Below are the javascript code and the xul code resp..
the javascript file is :
function openPopupMenu(){
mywind=
window.open( "chrome://window/content/style.xul", "Message", "chrome,scrollbars=1,height=300,width=800");
alert(mywind.document); // without this line it shows 0... with this it's 3 ??
var len = mywind.document.getElementsByTagName('box');
alert(len.length);
}
the xul file is :
style.xul
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="example-window" title="Example 2.2.1"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
<popupset>
<menupopup id="clipmenu">
<menuitem label="Cut"/>
<menuitem label="Copy"/>
<menuitem label="Paste"/>
</menupopup>
</popupset>
<box id='boxid' flex="1">
</box>
<box id='x'>
</box>
<box id='y'>
</box>
</window>

