I'm creating a web application that uses jQuery to populate a series of <div/>s in an HTML page using AJAX. All the JavaScript libraries and some "global" scripting is linked in the <head/> of the HTML document. Within the HTML <div/>s that are returned via AJAX, jQuery scripts that are specific to the contents of the <div/> are included. For example:
<div class="panel"> <script type="text/javascript">//<![CDATA[ $('#report-submit').click(function() { $('#report-form').ajaxSubmit(function() { $('#tab-pane-charts').load('test_charts.jsp', function() { activateTab('#tab-pane-container', 5); }); }); }); //]]></script> <h1>Reports</h1> <form id="report-form" action="ajax" method="post"> <input type="text" name="chart_value" value="Test chart value" /> <input type="button" id="report-submit" value="Chart it!"/> </form> </div> The advantage of keeping the scripts in the returned HTML is that the script can be generated by the server "on the fly", based on the contents of the other HTML in the <div/>. The script runs nicely with Firefox 1.5 but MSIE 6 completely ignores it. When I use the IE DOM Explorer (part of the DevToolBar: http://go.microsoft.com/fwlink/?LinkId=71881), the script does not appear in the DOM. Does anyone have suggestions how I can include the script as part of the returned HTML such that it will work with IE. Thanks in advance for your help! _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/