0

In my browser.xul file I have a panel element:

<panel id="panel1">
   <!-- Elements -->
</panel>

When I try:

window.document.getElementById("panel1").openPopup(button, "after_start", 0, 0, false, false);

the browser says that:

window.document.getElementById("panel1") is null.

Am I missing anything here?

Casey Jones
  • 155
  • 9
Selvaraj M A
  • 3,096
  • 3
  • 30
  • 46
  • 1
    I got the answer. Actually I was creating a new panel inside overlay. Basically, overlay is meant to override something. So, it just ignores it when there is something is new. so, I added it into already existing box element. It works fine! – Selvaraj M A Sep 28 '11 at 22:37
  • Yes, see my answer here: http://stackoverflow.com/questions/7391635/firefox-addons-hidden-browser-in-xul-overlay/7491047#7491047 – Wladimir Palant Sep 29 '11 at 07:53

1 Answers1

0

it's my first time I see panel tag in html..

are you sure you don't mean :

<div id="panel1">
....
</div>
Alex
  • 2,126
  • 3
  • 25
  • 47
  • 1
    This is in a Firefox extension. `panel` is a XUL element: https://developer.mozilla.org/en/XUL/panel – Wayne Sep 28 '11 at 20:58