This is a simplified example of an app that I'm working on. Can anyone
figure out why this isn't working in IE6? I don't know if the iframe
isn't loading the jquery.js file or if it's something deeper. Either
way it isn't doing what it's supposed to do. When you click the button
it should load new content into iframe and use jquery to show an alert
on document.ready.

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://
www.w3.org/TR/html4/loose.dtd'>
<html >
    <head >
        <script src='http://www.sjmarshall.com/include/scripts/jquery/
jquery-1.2.6.js' type='text/javascript'></script>
        <script type="text/javascript">
            function doIt() {
                var html = "<script src='http:\/\/www.sjmarshall.com\/
include\/scripts\/jquery\/jquery-1.2.6.js' type='text\/javascript'><\/
script>"
                       html += "\n<script type='text\/javascript'>$
(document).ready(function(){alert('slhg')})<\/script>"
                var ifr =
document.getElementById("printFrame").contentWindow;

                ifr.document.open("text/html", "replace");

                ifr.window.Calendar = {setup: function (){}};

                ifr.document.write(html);
                ifr.document.close();
            }
        </script>
    </head>
    <body>
        <button onclick="javascript: doIt();">Laslgha</button>
               <iframe id="printFrame"></iframe>
    </body>
</html>

Reply via email to