Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRouslan Placella <rouslan@placella.com>2012-06-09 20:46:00 +0400
committerRouslan Placella <rouslan@placella.com>2012-06-11 17:06:05 +0400
commit971db49c1143446238157c9bf6b8fc5bed3b55fb (patch)
tree07070feac86b2bb20ef668d74ace5b5748cdb12d /js/db_search.js
parentef2b98dd8e12c7f7bd11de65930c69556cf0c28b (diff)
Expect JSON for every ajax request in JavaScript
Diffstat (limited to 'js/db_search.js')
-rw-r--r--js/db_search.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/db_search.js b/js/db_search.js
index 5c80bb2f90..f1a18d48b4 100644
--- a/js/db_search.js
+++ b/js/db_search.js
@@ -193,10 +193,10 @@ $(function() {
PMA_prepareForAjaxRequest($form);
var url = $form.serialize() + "&submit_search=" + $("#buttonGo").val();
- $.post($form.attr('action'), url, function(response) {
- if (typeof response == 'string') {
+ $.post($form.attr('action'), url, function(data) {
+ if (data.success == true) {
// found results
- $("#searchresults").html(response);
+ $("#searchresults").html(data.message);
$('#togglesearchresultlink')
// always start with the Show message
@@ -219,7 +219,7 @@ $(function() {
.show();
} else {
// error message (zero rows)
- $("#sqlqueryresults").html(response['message']);
+ $("#sqlqueryresults").html(data.error);
}
PMA_ajaxRemoveMessage($msgbox);