title: IE7 Ext JS problem: Unspecified JS error on window.close()
body: <p>I am using Ext JS to make a popup window, here is the code:</p>
  
  <pre><code>function popupImage(term, imageNumber){
  
      if(currentPopupWindow!=null){
          currentPopupWindow.close();
      }
  
      currentPopupWindow = new Ext.Window({
                  layout      : 'fit',
                  closeAction :'hide',
                  plain       : true,
                  constrain   : true,
                  width: 300,
                  border: false,
                  html: "Blah blah content"&lt;span onclick=\"currentPopupWindow.close();\"&gt;cerrar&lt;/span&gt;"
              });
  
  
  
      currentPopupWindow.show(false, function(){
          var el = Ext.get("termimage");
          currentPopupWindow.setWidth(el.getWidth(true)+150);
      });
  
      currentPopupWindow.anchorTo(Ext.get("dictionarycontainer"), "tl");
  }
  </code></pre>
  
  <p>In firefox this works fine. In IE7 it works, but always produces a javascript error saying "unspecified error". </p>
  
  <p>What am I doing wrong?</p>
  
  <h2>EDIT</h2>
  
  <p>Removing the anchorTo line removes the error. I would still like to anchor to though so this isn't a great solution!</p>