views:

12

answers:

0

I am trying to dinamically load a xul overlay, using several calls to document.loadOverlay(myXul.xul) with the same .xul file. the .xul has a browser contained in a box contained in a window, resembling a suggestion i saw on this forum:


the loadOverlay() action is performed every time a firefox tab is opened, and the expected result is a small browser window added to each tab.

the initial result is promising - in each opened tab, i indeed see a different browser window (and if position is set to absolute, i see them appear side by side).

however, i also try to maintain a reference to any of these, in order to show or hide them according to user actions. i tried using something like "windowRef=document.getElementById("windowId");" and then accessing windowRef to change visibility attributes. i also tried changing the id of the window, when i noticed that loadOverlay() creates each new instance of the window with the same id - something like "document.getElementById("windowId").id=newWIndowId; windowRef=document.getElementById("newWindowId");"

however, i noticed that changing visibility attributes on the kept windowRef had no effect, and that giving the window reference a new id made it unavailable for future getElementById() calls. more importantly - after changing the window id, following calls to loadOverlay() have failed.

  1. is there any other element in the DOM that such an overlay can be loaded to?
  2. is there any other way to save a reference to such xul elements?
  3. why does changing an element id prevent calling loadOverlay() again?

i would appreciate your help.

thanks!