Send Ajax request after Auto Complete text box - after_update_element
Continuation for my previous post about Auto complete plugin
I have used after_update_element to send the value that is selected in the Auto complete
<%= text_field_with_auto_complete 'phonenumber', 'to',{:size=>25, :class=> "text ui-widget-content ui-corner-all", :value=>@service_order.phonenumber}, {:skip_style => false, :after_update_element=> "function(element,value){new Ajax.Request('/controller/action', {asynchronous:true, evalScripts:true, method:'get', parameters:'number=' + $('phonenumber_to').value }); return false;
}"} %>
I have used after_update_element to send the value that is selected in the Auto complete
<%= text_field_with_auto_complete 'phonenumber', 'to',{:size=>25, :class=> "text ui-widget-content ui-corner-all", :value=>@service_order.phonenumber}, {:skip_style => false, :after_update_element=> "function(element,value){new Ajax.Request('/controller/action', {asynchronous:true, evalScripts:true, method:'get', parameters:'number=' + $('phonenumber_to').value }); return false;
}"} %>
Comments
the basics of progamming on the Internet. It prepares you with
everything you need to know before jumping into advanced languages.
Great web site too for additional info.
java training