insertHtml not returning HTMLelement? - Ext JS

Using a3r2 on firefox, with firebug,

executing this:
Ext.DomHelper.insertHtml('beforeBegin', Ext.get('act').dom, '<div id="loading"><div class="loading-indicator"> Loading...</div></div> ')
It creates the "loading" div, but doesn't return the new HTMLElement. A little investigation shows that insertHtml is returning " "- just a space. Hurt me when I was trying to use the return value in centering it (which I'm now doing with an Ext.get("loading"))
  # 2  
03-11-2007, 03:32 AM

With beforeBegin it returns the "previousSibling" of the refNode. In your case that would a textNode with a space in it.

class="loading-indicator"> Loading...</div></div> ')  <--- space at end

你可能感兴趣的:(ext,Firebug,firefox)