View Full Version : ExtJS equivalent of jQuery.html(..)
13 Nov 2012, 10:11 AM
I need the functionality performed by the setter version of jQuery.html, as described here:
i.e. I want the JS code contained in the HTML fragment to be executed upon insertion. As the bare elem.innerHTML does not work the same, I've been trying to find an ExtJS equivalent, but it seems that the closest I could find, elem.insertHTML, also does not work in the same way (i.e. the code does not get executed).
14 Nov 2012, 5:00 PM
15 Nov 2012, 6:22 AM
I was expecting such a question, to be sure. What I'm trying to do is redirect, in a popup "Ext.Window", the content of a dynamic debug console (http://flask.pocoo.org/docs/quickstart/#debug-mode) spawned by a Flask Python dev server. If I bind this redirection to the "exception" and "failure" callback handlers of my widgets, I can inspect and interact readily with my backend code, directly in the UI of my app (without any reloading) whenever an exception occurs. This is quite handy.
I studied the question rather thoroughly, and found that the "jQuery.html" behaviour (using "domManip") is needed to correctly display and execute the JS code snippet that is embedded in the code returned by the debug console. It works, but I was curious to know if I could come up with a 100% ExtJS solution, without resorting to jQuery.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.