Hello. I'm having a problem with the following code:

        $(".prodname").livequery(function(){ $(this).autocomplete
("search.php", {
                extraParams: { 'type':'products' }
                }); });

        $(".prodname").livequery(function(e){ $(this).change(function(e) {
                        $(".barcode."+thisline(e)).val('');
                        $.ajax({
                                                type: "GET",
                                                url: "agent.php",
                                                data: 
"prodname="+$(".prodname."+thisline(e)).val()
+"&action=getprodid",
                                                success: function(text){
                                                  
$(".prodid."+thisline(e)).val(text);
                                                }
                        });
                }); });

It seems that the change event doesn't auto-bind to new elements. If I
use .click() it works fine. If I remove the auto complete it works
fine. And the .change() gets triggered just fine on static elements -
the problem is only on  new (ajaxly added)elements.

Reply via email to