et_calcform.php",{ idref: iditem }, function()
{
$("#calculate").click(
function(){
alert('hi'); });
});});
Hope that
helps.
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of Rafael
SantosSe
Thanks you two... How silly was i... lol2006/9/3, John Resig <[EMAIL PROTECTED]>:
> The code:> $(document).ready( function(){> $("#main").load("get_calcform.php",{ idref: iditem },> function(txt){> $("#main").html(txt);
> }> );> $("#calculate").click( function(){>a
> The code:
> $(document).ready( function(){
> $("#main").load("get_calcform.php",{ idref: iditem },
> function(txt){
> $("#main").html(txt);
> }
> );
> $("#calculate").click( function(){
>alert('hi');
> });
The problem is that you're binding the click handler to
$load automatically loads the result of that request into the selected DIV, so in that case you wouldnt need a callback.On 9/3/06, Rafael Santos <
[EMAIL PROTECTED]> wrote:Hey, i'd like to know why it happens..
The code:$(document).ready( function(){ $("#main").load("get_calcform.php",{ idref: i
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 -> then nothing happens when Calcu