From: Robert Treat Date: Wed, 28 Nov 2012 03:57:45 +0000 (-0500) Subject: Fix an issue with population of FK fields using autocomplete. X-Git-Tag: REL_5-1-0~20^2 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=bcf3cae0584becfd6cba7bf7b97fd166c97ab392;p=phppgadmin.git Fix an issue with population of FK fields using autocomplete. The fix comes from a comment by Dmytry Scherbina in a pull request originally submitted by Jakob Klein. --- diff --git a/js/ac_insert_row.js b/js/ac_insert_row.js index d94edf5a..1101a99d 100644 --- a/js/ac_insert_row.js +++ b/js/ac_insert_row.js @@ -176,7 +176,7 @@ with(jQuery('tr.acline')) { var a = jQuery(this).find('td > a.fkval'); for (i=0; i < a.length; i++) { - jQuery('input[name="values['+ a[i].name +']"]').val(a[i].innerHTML); + jQuery('input[name="values['+ a[i].name +']"]').val(jQuery(a[i]).text()); } hideAc(); });