Hi Maurício

I can get this work using the regular events but not with autocomplete. If
you don’t mind can you point me in the right direction?

This is how I currently assign autocomplete to my input:
$(document).ready(function()
{
        str = '<?php echo $ingredient_string; ?>';
        data = str.split('|');
        
        $('#IngredientList0Ingredient').autocomplete(data);
        
        
});

When I tried to this:
$(document).ready(function()
{
        str = '<?php echo $ingredient_string; ?>';
        data = str.split('|');
        
        $('#IngredientList0Ingredient').live('onkeyup', autocomplete(data));
                
});

I get an error saying the autocomplete is not defined.

I think I have to look into bind. But am not sure.

Thanks for any advice you can offer.





-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mauricio (Maujor) Samy Silva
Sent: Wednesday, January 14, 2009 5:20 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Noob


Use the new event feature .live(type, fn) [1] provided with the just
launched  realease: jQuery 1.3 [2]

[1] -  http://docs.jquery.com/Events/live
[2] - http://docs.jquery.com/Release:jQuery_1.3

Maurício
-------------------------------------

> Hello,
> I have a table that has some form inputs in a single row. One of the 
> text inputs is an autocomplete that gets its data from a PHP variable.
> I have all that working.
>
> I have a button that clones this row and all its inputs incrementing 
> the IDs and then appending it to the table. That works fine.
>
> The problem I am having is that I dont know how to attach the 
> autocomplete to the input in the new row.
>
> I have pasted my code below. If you read it you can probably tell that 
> I ran into the same issue with the delete row button, but I got around 
> by using straight Javascript. But if I can solve how to attach to a 
> new element I can fix both problems.
>
>
> Thanks in advance.
> Steve

Reply via email to