Thanks for the previous help with the getElementById issue.. I have
another quirk now.
I dynamically create a menu from an XML file as follows:
var d = document;
var popup = d.getElementById('server1.popup');
var database = d.getElementById('server1');
var value = d.getElementById('server1').value;
var p = d.createElement('menupopup');
p.setAttribute('id', "server1.popup");
p.setAttribute('crop', "right");
var biobar_Menus = biobar_xmlFile.getElementsByTagName("Group");
for (var i=0; i<biobar_Menus.length; i++) {
var biobar_Menu = biobar_Menus[i].getAttribute("type");
var tmp_menu = d.createElement('menu');
tmp_menu.setAttribute('label', biobar_Menu);
tmp_menu.setAttribute('id', biobar_Menu);
tmp_menu.setAttribute('value', biobar_Menu);
tmp_menu.setAttribute('class', 'menuitem-non-iconic');
tmp_menu.setAttribute('oncommand', 'doCMD(event.target)');
var tmp_tmp = d.createElement('menupopup');
tmp_menu.appendChild(tmp_tmp);
var biobar_Menuitems =
biobar_Menus[i].getElementsByTagName("Database");
for (var m=0; m<biobar_Menuitems.length; m++) {
var biobar_Name =
biobar_Menuitems[m].getAttribute("type");
var biobar_names = d.createElement('menuitem');
biobar_names.setAttribute('label', biobar_Name);
biobar_names.setAttribute('value', biobar_Name);
tmp_tmp.appendChild(biobar_names);
}
p.appendChild(tmp_menu);
}
database.appendChild(p);
In F2.0 once the menu was made on the toolbar, selecting a menuitem
would persist on the toolbar.. However, with the same piece of code, the
menubox remains blank. The XUL for this is
<menulist id="server1" value="msdserver"
hidden="false" persist="selected" style="width:160px;">
<menupopup id="server1.popup" />
</menulist>
Anyone know if there is an issue with this in FF3.0 ?
Thanks again -
Jawahar
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners