You should re-bind this JavaScript event on this element if the element be dynamically updated

来源:互联网 发布:linux 查看cpu型号 编辑:程序博客网 时间:2024/06/02 07:28

 

Description: the sub-frame is response for receiving data from background and renders them to HTML code. Then update the special HTML element in parent. Since the element has been updated totally, even though they are the same id and name, the events which bind on them before will not be effective. We have to bind these events again in sub-frame.

And you also invoke parent function do it in the sub-frame. Explicitly like this:

..getHtmlFromBackgound;

..renderHTML;

..updateParentHtmlElement;

window.parent.rebind();