First off, you need to read this 
http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Rate_me:_Using_Ajax
http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Rate_me:_Using_Ajax
 
tutorial by Jorn Zaefferer, particularly the bit the starts 'A very common
problem encountered...' about half way down.

Having read that...

You either need to look into the Behaviors plugin - which will automatically
attach existing events to any new (and appropriate) elements loaded - or you
need to include event assignment for the new selects in your callback.


Muhammad Mohsin wrote:
> 
> 
> Hello
> I want to associate a select box coming from ajax to change function
> of form which is defined in the page. Can anyone help me
> 
> $('#frmNewDev select').each(function()
>       {
> 
>               $(this).change(function()
>               {
>               if(this.id != "sl_developer")
>               {
>                       var load_image = " http://"; + this_domain + "/images/
common/loading.gif ";
>                       //$('#nn').html(load_image);
>                       $.get('http://' + this_domain + 
> '/cp/ajax_cp_locality.php',
> {cat_id: this.value},
>                       function(str) {$("#nn").append(str);});
>                       return false;
>               }
>       });
> });
> 
> 
> I m using above code for associate all select box with this function
> ....but select which are coming from ajax page are not associated....how
> can I associate that select box with this function. thnx
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Select-box-help-from-ajax-tf4311393s15494.html#a12277377
Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to