[jQuery] [Beginner. Help] Javascript not function in the loaded content by AJAX

[jQuery] [Beginner. Help] Javascript not function in the loaded content by AJAX

<!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.2964" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=宋体 color=#0000ff size=2></FONT> </DIV>
<DIV></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2>Urgent!</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2>I am new to
jQuery.</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2>Can anybody help me out
why javascript in the loaded contend by AJAX .post or load can not function at
all?</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2><SPAN
class=803082403-17112006><FONT face=宋体 color=#0000ff>H</FONT></SPAN>ow to solve
this problem<SPAN class=803082403-17112006><FONT face=宋体
color=#0000ff>?</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2><SPAN
class=803082403-17112006><FONT face=宋体 color=#0000ff>Any clue or help is
appreciated.</FONT> </SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2>I am using IE 6.0 browser, and
server side is running Catalyst in Perl.</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2>For
example.</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT size=2>There is one page
like:</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT
size=2>####################</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体 size=2><SCRIPT
type="text/javascript" ><BR>$(document).ready(function()
{<BR>   
$("input.buttonAdd").click(function(){<BR></FONT></SPAN><SPAN
class=656543702-17112006><FONT face=宋体
size=2>       
$.post('/ajax_input',$("#input_form").fastSerialize(),
function(data){</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体
size=2>        ...</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体
size=2>       
$("div#append_area").append(data);<BR> <BR>   
});</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体 size=2>});</FONT></SPAN></DIV>
<DIV><FONT face=宋体 size=2><SPAN
class=656543702-17112006></SCRIPT></SPAN></FONT></DIV>
<DIV><FONT face=宋体 size=2><SPAN
class=656543702-17112006></SPAN></FONT> </DIV>
<DIV><FONT face=宋体 size=2><SPAN class=656543702-17112006>...</SPAN></FONT></DIV>
<DIV><FONT face=宋体 size=2><SPAN class=656543702-17112006><FORM
id="input_form"></SPAN></FONT></DIV>
<DIV><FONT face=宋体 size=2><SPAN class=656543702-17112006><input type="text"
name="user" value="" size="12" /></SPAN></FONT></DIV>
<DIV><FONT face=宋体 size=2><SPAN class=656543702-17112006>...</SPAN></FONT></DIV>
<DIV><FONT face=宋体 size=2><SPAN class=656543702-17112006><input type="button"
value="Add" class="buttonAdd" /><BR></FORM></SPAN></FONT></DIV>
<DIV><FONT face=宋体 size=2><SPAN
class=656543702-17112006></SPAN></FONT> </DIV>
<DIV><FONT face=宋体 size=2><SPAN class=656543702-17112006><br /><BR><div
id="append_area"><BR></div><BR>##################</DIV></SPAN></FONT>
<DIV><FONT face=宋体 size=2></FONT> </DIV>
<DIV><FONT face=宋体 size=2></FONT> </DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体 size=2>The remote content
'data' generated by ajax_input in server side looks
like:</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体
size=2>########</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体 size=2>

Load by
Ajax<FONT color=#0000ff><SPAN class=803082403-17112006> </SPAN><SPAN
class=803082403-17112006> </SPAN></FONT>

<BR><SCRIPT
type="text/javascript" ><BR>alert("In Ajax loaded
content!!!");<BR>$(document).ready(function() {<BR>   
$("a.status").click(function(){<BR>       
alert("OK>>>>>>>>>");<BR>   
});<BR>});<BR></SCRIPT></FONT></SPAN></DIV><SPAN class=656543702-17112006>
<DIV><FONT face=宋体 size=2></FONT><BR><FONT face=宋体><FONT size=2><TABLE
class="xx"><BR><SPAN class=656543702-17112006>...</SPAN></FONT></FONT></DIV>
<DIV></SPAN><FONT face=宋体 size=2><a href="#" class="status"><SPAN
class=656543702-17112006>Status</SPAN></a></FONT></DIV>
<DIV><SPAN class=656543702-17112006>...</SPAN></DIV>
<DIV><SPAN class=656543702-17112006></TABLE></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体
size=2>########</FONT></SPAN></DIV>
<DIV><FONT face=宋体 size=2></FONT> </DIV>
<DIV><FONT face=宋体 size=2></FONT> </DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体 size=2>Now the web page is
rendered well. When the button 'Add' is clicked, the remote file is injected
into "append_area" div.</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体 size=2>And my intention is if
click hyperlink  "Status', the embeded javascript codes in the loaded
content will be executed.</FONT></SPAN></DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656543702-17112006><FONT face=宋体 size=2>But the problem is the
javascript codes such as the alert do not run at all when the
hyperlink<SPAN class=803082403-17112006><FONT color=#0000ff>  is
clicked </FONT></SPAN>.</FONT></SPAN></DIV>
<DIV><FONT face=宋体 size=2></FONT> </DIV><!-- Converted from text/plain format -->
<P align=left><SPAN lang=zh-cn><SPAN class=656543702-17112006><FONT
size=2>Jack</FONT></SPAN></SPAN></P></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/