How to display URL result ouside search drop down?

Hi, as you can see an image I want the way it display as in part B. I have post a RAR file to download.
AJAX (29.0 KB)
ClamAV found no problems with these files - TechnoBear

As you can click on a search result, it open up another page with the link associated with that search result as in part A.

Instead of opening up another page when the search result is clicked, simply display the full URL (e.g.…) below the search box (not inside the search results). No contents of the target page, only the URL in the space below the search box.

<?php $dbhost="localhost";
 global $tutorial_db;
 $tutorial_db=new mysqli();
 if ($tutorial_db->connect_errno) {
  printf("Connect failed: %s\n", $tutorial_db->connect_error);
 $html .='<li class="result">';
 $html .='<a target="_blank" href="urlString">';
 $html .='<h3>nameString</h3>';
 $html .='<h4>functionString</h4>';
 $html .='</a>';
 $html .='</li>';
" ",
 if (strlen($search_string) >=1 && $search_string !==' ') {
  $query='SELECT * FROM search WHERE function LIKE "%'.$search_string.'%" OR name LIKE "%'.$search_string.'%"';
  while($results=$result->fetch_array()) {
  if (isset($result_array)) {
    foreach ($result_array as $result) {
      $display_function=preg_replace("/".$search_string."/i", "<b class='highlight'>".$search_string."</b>", $result['function']);
      $display_name=preg_replace("/".$search_string."/i", "<b class='highlight'>".$search_string."</b>", $result['name']);
      $output=str_replace('nameString', $display_name, $html);
      $output=str_replace('functionString', $display_function, $output);
      $output=str_replace('urlString', $display_url, $output);
  else {
    $output=str_replace('urlString', 'javascript:void(0);', $html);
    $output=str_replace('nameString', '<b>No Results Found.</b>', $output);
    $output=str_replace('functionString', 'Sorry :(', $output);
<!--This is JSFILE.js linked with html file-->

$(document).ready(function() {

  $('div.icon').click(function() {

  function search() {
    var query_value = $('input#search').val();
    if (query_value !== '') {
        type: "POST",
        url: "search.php",
        data: {
          query: query_value
        cache: false,
        success: function(html) {
    return false;

  $("input#search").live("keyup", function(e) {

    clearTimeout($.data(this, 'timer'));

    if (search_string == '') {
    } else {
      $(this).data('timer', setTimeout(search, 100));

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.