Bug Tracker

Changes between Initial Version and Version 1 of Ticket #746


Ignore:
Timestamp:
Dec 29, 2006, 6:26:11 PM (13 years ago)
Author:
joern
Comment:

Thanks for the report, that helps a lot. The issue occured before, but we failed to find the source of the problem.

The solution is a bit more complicated, because we have to insert the HTML into the DOM first before we can use any selectors. On the other hand, if we parse the HTML by hand and evaluate any scripts, we have to prevent that they are executed again later.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #746

    • Property Priority changed from minor to major
    • Property Version changed from to 1.1
    • Property Milestone changed from to 1.1
  • Ticket #746 – Description

    initial v1  
    1 $("#feeds").load("feeds.html")  Call to .evalScripts() fails in Internet Explorer
     1$("#feeds").load("feeds.html")
     2
     3Call to .evalScripts() fails in Internet Explorer
    24
    35jQuery.fn.extend for load: makes a call to jQuery.ajax(...) and on completion does a self.html(res.responseText) which eventually does a elem[fix[name]] = value and that is why it fails to process the scripts in Internet Explorer.  The "innerHTML" attribute (also "text" attribute) for IE (tested/verified for IE 6.0) strips out <script> tag elements from the HTML.  This is the test code that I used for my IE testing.
     6
     7{{{
    48var script = "<script language="JavaScript"
    59type="text/JavaScript">alert('im really running');</script>";
    610var oVDiv =document.getElementById("oDiv1");
    711oVDiv["innerHTML"] = script; // fails
     12}}}
    813
    914Suggested fix would be to pass res.responseText to evalScripts: function() {