function update_table() { var url = '/api/contacts/search?term=' + escape(this.value); new Ajax.Updater('contacts-table', url { asynchronous: true }); }