[jQuery] no action after $.load.. why?

[jQuery] no action after $.load.. why?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=442555211-04092006><FONT face=Arial size=2>With the load
function you don't need to do the $("#main").html(txt); bit. That's
probably causing an error. Are you on firefox? Try the developer
extensions/firebug to track down errors.</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial size=2>Try
</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial size=2>$(document).ready(
function(){    <BR>   
$("#main").load("get_calcform.php",{ idref: iditem });<BR>   
$("#calculate").click( function(){<BR>      
alert('hi');<BR>    });</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial
size=2>});</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial size=2>If you're
#calculate tag is part of what's loaded you'll need to do
this</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial size=2>
<DIV><SPAN class=442555211-04092006><FONT face=Arial size=2>$(document).ready(
function(){    <BR>   
$("#main").load("get_calcform.php",{ idref: iditem }, function()
{</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial
size=2>        $("#calculate").click(
function(){<BR>          
alert('hi');<BR>        });   
</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006><FONT face=Arial size=2>   
});<BR></FONT></SPAN><SPAN class=442555211-04092006><FONT face=Arial
size=2>});</FONT></SPAN></DIV>
<DIV><SPAN class=442555211-04092006></SPAN> </DIV>
<DIV><SPAN class=442555211-04092006>Hope that
helps.</SPAN></DIV></FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Arial
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Rafael
Santos<BR><B>Sent:</B> 03 September 2006 05:01<BR><B>To:</B> jQuery
Discussion.<BR><B>Subject:</B> [jQuery] no action after $.load..
why?<BR><BR></FONT></DIV><FONT face=Arial size=2>Hey, i'd like to know why it
happens..<BR><BR>The code:<BR>$(document).ready( function(){   
<BR>$("#main").load("get_calcform.php",{ idref: iditem
},<BR>       
function(txt){<BR>           
$("#main").html(txt); <BR>        }<BR> 
);<BR>$("#calculate").click( function(){<BR>  
alert('hi');<BR>});<BR><BR>//output -> <form method="post"><//some
inputs><input type='button' value='calculate'
id='calculate'></form><BR><BR>then nothing happens when Calculate is
clicked...<BR><BR>Even if i change it (without form tag and submit
button):<BR>...<BR>function(txt){<BR>       
    $("#main").html(txt+"<a id='calculate'>calculate
it</a>");<BR>        }<BR>...<BR><BR>But
if i do .... $("#main").html(txt+"<a id='calculate' onclick='alert('hmm it
works')'>calculate it</a>"); .... IT WORKS..<BR><BR>Am i doing
something wrong?<BR><BR><BR></FONT></BLOCKQUOTE></BODY></HTML>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Arial">This e-mail is confidential to the addressee and may contain privileged information. </FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Arial">If you are not the addressee you are not permitted to use or copy this e-mail or its attachments nor disclose same to any third party. </FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Arial">If this has been sent to you in error please notify us as soon as possible. </FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Arial">We reserve the right to intercept and read e-mails sent or received by our employees. </FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Arial">If you do not wish for your communications to be subjected to such scrutiny, you should not communicate via this e-mail system. </FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Arial">We endeavour to exclude viruses from our data but it is the responsibility of the recipient to check any attachments for viruses.</FONT></P>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/