From fd83a468d56fa6fb1e117ecba3ba2c12b8f1211a Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Thu, 20 Dec 2012 03:13:15 +0530 Subject: [PATCH] Fix display chart --- js/ajax.js | 8 +++++--- tbl_chart.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/ajax.js b/js/ajax.js index 0ac45f9bdb..902eea3d4b 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -247,9 +247,11 @@ var AJAX = { .not('#session_debug') .remove(); // Replace #page_content with new content - $('#page_content').replaceWith( - "
" + data.message + "
" - ); + if(data.message && data.message.length > 0) { + $('#page_content').replaceWith( + "
" + data.message + "
" + ); + } if (data._selflink) { $('#selflink > a').attr('href', data._selflink); diff --git a/tbl_chart.php b/tbl_chart.php index 3b4acb6060..5031b63799 100644 --- a/tbl_chart.php +++ b/tbl_chart.php @@ -120,7 +120,7 @@ url_query = '';
-
+