[jQuery] Re: Code Simplifying Help

2009-03-01 Thread mkmanning
If your markup will remain as you've shown, you can get away with this: $('select[id^=Branch]').change(function(){ var _this = $(this); ajax_loading_image('.ajax_loading_image'); _this.parent().next().load('get_members',{'ajax':true,'id':_this.val ()},funct

[jQuery] Re: Code Simplifying Help

2009-03-01 Thread ramonmaruko
Thank you, it worked perfectly!(aside from the extra ' beside the word "Branch") Time to understand the code. :D MorningZ wrote: > $('select[id^='Branch]').change(function(){ > var idx = this.id.substr(this.id.length - 1); > var selected = $(this).val(); > ajax_loading_ima

[jQuery] Re: Code Simplifying Help

2009-02-28 Thread MorningZ
$('select[id^='Branch]').change(function(){ var idx = this.id.substr(this.id.length - 1); var selected = $(this).val(); ajax_loading_image('.ajax_loading_image'); $.ajax({ type: "POST", url: 'get_members', data: "ajax=true&id="+se