Ok, I don't want to get into the debate as to whether or not using eval is the correct thing to do. I did this more as an exercise to help me understand javascript better. This patch replaces the portion of element.update that appends inline javascript in the string supplied to the head element of the document, with an eval statement that runs on the string. References to javascript source files should still be appended to the head of the document, though I haven't tested it.

I've tested this in ie6 firefox

To use this, you would just run this javascript after you load the yui-ext.js file.

YAHOO.ext.Element.prototype.update = function(html, loadScripts){
        this.dom.innerHTML = html;
        if(!loadScripts) return this;
        var dom = this.dom;
        var _parseScripts = function(){
            var s = dom.getElementsByTagName("script");
            var docHead = document.getElementsByTagName("head")[0];
            //   For browsers which discard scripts when inserting innerHTML, extract the scripts using a RegExp
            if(s.length == 0){
                var re = /(?:<script.*(?:src=[\"\'](.*)[\"\']).*>.*<\/script>)|(?:<script.*>([\S\s]*?)<\/script>)/ig; // assumes HTML well formed and then loop through it.
                var match;
                while(match = re.exec(html)){
                     var s0 = document.createElement("script");
                     if (match[1])
                        s0.src = match[1];
                     else if (match[2])
            } else {
              for(var i = 0; i < s.length; i++){
                 var s0 = document.createElement("script");
                 s0.type = s[i].type;
                 if (s[i].text) {
                 } else {
                    s0.src = s[i].src;
        // set timeout to give DOM opportunity to catch up
        setTimeout(_parseScripts, 10);
        return this;