On Friday, December 16, 2011 5:54:54 PM UTC-5, Cliff wrote:
>
> Adi,
>
> $("#po_sku_sku_id").change(function(event){
>
> could also be
>
> $("#po_sku_sku_id").live('change', function(event){
>
> In case the user changes it a second or third time.
>
I'm not a jQuery expert, but I think the .change() handler will trigger on
every change event. The purpose of .live() is to allow the handler to be
added to elements that are not originally in the DOM at the time the
handler is defined but added dynamically at a later time (which I don't
think applies in this case). In any case, jQuery now recommends using .on()
instead of .live() as of 1.7, and .delegate() rather than .live() in older
versions (in other words, avoid .live).
Anthony