[jQuery] ajax question with javascript on called page in ie6
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=724582412-05122006><FONT face=Arial size=2>Hi
all,</FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial size=2>I've been trying
hard to get the following scenario to work. On page 1 there is a link, when
clicked an ajax page will be loaded and shown in a div. However this ajax page
contains some javascripts and this is not executed in ie6. I think the problem
is with ie6 but if anyone knows of a workaround I will be gratefull. For
now I will put all the javascript that I will ever receive from these ajax pages
in the calling page but this poses a lot of problems. (since these ajax pages
are part of a wizard, the next button should be enabled and disabled based on
certain conditions which are different on each page of
course).</FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial size=2>An example of the
simplest thing for this is:</FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial size=2>parent
page:</FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial size=2><script
type="text/javascript" src="<A
href='http://localhost/js/jquery.js"></script'>http://localhost/js/jquery.js"></script</A>><BR><script></FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial size=2>function loadMe()
{<BR> $.get("<A
href="http://localhost/child.html">http://localhost/child.html</A>",
function(str)
{<BR> $("#here").html(str);<BR> $("#here").find('script').each(function(){<BR> eval.call(
window, this.text || this.textContent || this.innerHTML || ""
);<BR> });<BR> });<BR> return
false;<BR>}<BR></script><BR></head><BR><body><BR> <a
href="javascript:void(0)" onclick="loadMe()">Click</a><BR> <div
id="here"></div><BR></body><BR></html></FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2>child.html:</FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2> <script
type="text/javascript"><BR> alert("show
me");<BR> </script><BR> that's
it.<BR></FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial size=2>I tried putting some
$(document).ready(function()) on the child page but to no avail. IE6 kept on
refusing to show the alert with show me in it.</FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2>Gr</FONT></SPAN></DIV>
<DIV><SPAN class=724582412-05122006><FONT face=Arial
size=2>Ronald</DIV></FONT></SPAN></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/