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:
authorAtul Pratap Singh <atulpratapsingh05@gmail.com>2014-10-01 08:30:54 +0400
committerAtul Pratap Singh <atulpratapsingh05@gmail.com>2014-10-01 08:30:54 +0400
commita020eac11a26977295cf2439ddd2e5b4af2c88fe (patch)
treea25ad8d5dbfdc66f96321930dab50de9fe242e3b /js/db_search.js
parentdbdd90511bcb24fefcf2b88f12bd342d4abef9b2 (diff)
Add js checks in multiple files if data is undefined
Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
Diffstat (limited to 'js/db_search.js')
-rw-r--r--js/db_search.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/db_search.js b/js/db_search.js
index d5eb449dc5..f8e5ced93c 100644
--- a/js/db_search.js
+++ b/js/db_search.js
@@ -46,7 +46,7 @@ function loadResult(result_path, table_name, link)
$('#table-link').attr({"href" : 'sql.php?' + link }).text(table_name);
var url = result_path + "#sqlqueryresults";
$.get(url, {'ajax_request': true, 'is_js_confirmed': true}, function (data) {
- if (data.success) {
+ if (typeof data !== 'undefined' && data.success) {
$('#browse-results').html(data.message);
$('html, body')
.animate({
@@ -85,7 +85,7 @@ function deleteResult(result_path, msg)
var url = result_path + "#result_query, #sqlqueryform";
$.get(url, {'ajax_request': true, 'is_js_confirmed': true},
function (data) {
- if (data.success) {
+ if (typeof data !== 'undefined' && data.success) {
$('#sqlqueryform').html(data.sql_query);
/** Refresh the search results after the deletion */
document.getElementById('buttonGo').click();
@@ -202,7 +202,7 @@ AJAX.registerOnload('db_search.js', function () {
var url = $form.serialize() + "&submit_search=" + $("#buttonGo").val();
$.post($form.attr('action'), url, function (data) {
- if (data.success === true) {
+ if (typeof data !== 'undefined' && data.success === true) {
// found results
$("#searchresults").html(data.message);