Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix character-encoding problem with autocomplete

...And enforce some ajax call properties in js/ac_insert_row.js
  • Loading branch information...
commit 58026938c49dda4490e550bbd14eecd9cc6f238e 1 parent 6d48047
@ioguix ioguix authored
Showing with 11 additions and 2 deletions.
  1. +8 −2 ajax-ac-insert.php
  2. +3 −0  js/ac_insert_row.js
View
10 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++;
View
3  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();
Please sign in to comment.
Something went wrong with that request. Please try again.