Firstly, your code which you've given has a lot of syntax errors. The
selectors are not all enclosed within '' (single quotes).
Secondly, in my opinion $('#divld table input') will actually result in an
array of inputs (even if length is 1). So you might need to do something
like this :

$('#divId table input').each(function() {
        $(this).click(function(){
                 alert('I am here');
        });
});

Thanks & Regards,
Dhruva Sagar.




On Sun, Nov 15, 2009 at 9:34 AM, nevadaMedicaid <mrosenb...@dhcfp.nv.gov>wrote:

> $.post(''strutseventname', $('form:first').serialize(),
>   function(data) {
>     $('#divId').html(data);
>     alert('am i visible ' + $('#divId table input).length);
>     $('#divId table input).click(function() {
>         alert('i am here');
>     });
>   }, "html");
>
> when i execute the function above, the data in divId appears but the
> click function doesnt work. i inserted the alert between inserting the
> data and setting the click event.  it shows that the data is not
> visible to jQuery.
>
> It appears that jQuery cant see the new data until after the
> javascript method ends.
>
> can you help me understand where i am going wrong?
>
> thanks
>

Reply via email to