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

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

Hey, i'd like to know why it happens..
The code:
$(document).ready( function(){   
$("#main").load("get_calcform.php",{ idref: iditem },
        function(txt){
            $("#main").html(txt);
        }
  );
$("#calculate").click( function(){
   alert('hi');
});
//output -> <form method="post"><//some inputs><input type='button' value='calculate' id='calculate'></form>
then nothing happens when Calculate is clicked...
Even if i change it (without form tag and submit button):
...
function(txt){
            $("#main").html(txt+"<a id='calculate'>calculate it</a>");
        }
...
But if i do .... $("#main").html(txt+"<a id='calculate' onclick='alert('hmm it works')'>calculate it</a>"); .... IT WORKS..
Am i doing something wrong?
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/