From 4767612d3c88033089ed1657b89749d8de3d247a Mon Sep 17 00:00:00 2001 From: ninadsp Date: Fri, 2 Jul 2010 03:34:44 +0530 Subject: [PATCH] Added a division to include the search results in, suppressed some output in an ajax request. --- db_search.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/db_search.php b/db_search.php index 627ac2567..ebc5d66b2 100755 --- a/db_search.php +++ b/db_search.php @@ -55,6 +55,9 @@ */ require_once './libraries/common.inc.php'; +$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2.js'; +$GLOBALS['js_include'][] = 'db_search.js'; + /** * Gets some core libraries and send headers */ @@ -129,8 +132,11 @@ if (empty($_REQUEST['field_str']) || ! is_string($_REQUEST['field_str'])) { * Displays top links */ $sub_part = ''; -require './libraries/db_info.inc.php'; +if( $GLOBALS['is_ajax_request'] != true) { + require './libraries/db_info.inc.php'; + echo '
'; +} /** * 1. Main search form has been submitted @@ -287,13 +293,19 @@ if (isset($_REQUEST['submit_search'])) { } } // end 1. +if($GLOBALS['is_ajax_request'] == true) { + exit; +} +else { + echo '
';//end searchresults div +} /** * 2. Displays the main search form */ ?> -
+