i'm using jquery to invoke JSON-requests and they're triggered form a bunch of autocomplete-fields. I use wildcard-selector and now need to find out which ac-field that fired the event.
...
$( "[id*='_lookupCmb']" ).autocomplete({
source: function( request, response ) {
$.ajax({
...
...
select: function( event, ui ) {
//here I want to get the name of the id calling the request...
Thankful for any quickfix or guidance in wiser solution.
ATB
//tom joad
I believe under the ui argument object is an elem
, and origElem
, or something of a similar name (might be target
, break inside using firebug and drill into it to find out for sure); then you can simply say $(ui.elem).attr('id')
.