diff options
author | Guillaume (ioguix) de Rorthais | 2011-01-06 23:20:42 +0000 |
---|---|---|
committer | Guillaume (ioguix) de Rorthais | 2011-01-06 23:20:42 +0000 |
commit | 774f179dbd007fa254d16d8ff28afec120e371a1 (patch) | |
tree | dc93398c6b46a67af2c66b665b57aa8ee2a056da | |
parent | 13eb806880941b93ecc7671fc66e4f20a79069c8 (diff) |
Fix character-encoding problem with autocomplete
...And enforce some ajax call properties in js/ac_insert_row.js
-rw-r--r-- | ajax-ac-insert.php | 10 | ||||
-rw-r--r-- | js/ac_insert_row.js | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ajax-ac-insert.php b/ajax-ac-insert.php index 49144a97..30679df6 100644 --- a/ajax-ac-insert.php +++ b/ajax-ac-insert.php @@ -44,12 +44,18 @@ echo "</tr>\n"; $i=0; while ((!$res->EOF) && ($i < 11)) { + $j=0; echo "<tr class=\"acline\">"; foreach ($res->fields as $n => $v) { + $finfo = $res->fetchField($j++); if (in_array($n, $fkeynames)) - echo "<td><a href=\"javascript:void(0)\" class=\"fkval\" name=\"{$keyspos[$n]}\">",htmlentities($v), "</a></td>"; + echo "<td><a href=\"javascript:void(0)\" class=\"fkval\" name=\"{$keyspos[$n]}\">", + $misc->printVal($v, $finfo->type, array('clip' => 'collapsed')), + "</a></td>"; else - echo "<td><a href=\"javascript:void(0)\">", htmlentities($v), "</a></td>"; + echo "<td><a href=\"javascript:void(0)\">", + $misc->printVal($v, $finfo->type, array('clip' => 'collapsed')), + "</a></td>"; } echo "</tr>\n"; $i++; diff --git a/js/ac_insert_row.js b/js/ac_insert_row.js index 6ac0bef2..d94edf5a 100644 --- a/js/ac_insert_row.js +++ b/js/ac_insert_row.js @@ -77,6 +77,9 @@ function openlist(e) { url: 'ajax-ac-insert.php?server=' + server, type: 'post', data: datas, + dataType: 'html', + cache: false, + contentType: 'application/x-www-form-urlencoded', success: function (ret) { jQuery.ppa.i = 0; jQuery.ppa.fkbg.show(); |