Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:38:07+00:00 2026-06-03T07:38:07+00:00

So, I have developed a live search function on my site but, no big

  • 0

So, I have developed a live search function on my site but, no big surprise, it doesn’t seem to work in Internet Explorer. I have tested and it won’t work in IE9 and IE8 and I know it works as I want in Chrome and Fire Fox. The Ajax I used I took from the W3Schools website and it seems to be working there. It might even be the PHP I used, but I’m not really sure what the problem is. I’m just guessing that it’s either the Ajax or PHP. Anyone know what’s wrong? It is located at -RETRACTED URL- if it helps. Thanks!

Ajax in my HTML document:

<script type="text/javascript">
var keyword = ''; // add this!
var city = ''; // add this!
var state = ''; // add this!
var country = ''; // add this!

function showHint(keyword, city, state, country) {
    var xmlhttp;
    if(keyword.length == 0 && city.length == 0 && state.length == 0) {
        document.getElementById("txtHint").innerHTML = "";
    }
    if(window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp = new XMLHttpRequest();
    }
    else { // code for IE6, IE5
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange = function () {
        if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET", "gethint.php?keyword=" + keyword + "&city=" + city + "&state=" + state + "&country=" + country, true);
    xmlhttp.send();
}
</script>

PHP for the live search:

<?php
//get the parameters from URL
$keyword = $_GET['keyword'];
$city = $_GET['city'];
$state = $_GET['state'];
$country = $_GET['country'];
$query = mysql_query("SELECT * FROM users WHERE ClinicName LIKE '%$keyword%' AND LocationCity LIKE '%$city%' AND LocationRegion LIKE '%$state%' AND LocationCountry LIKE '%$country%' ORDER BY ClinicName ASC") or die(mysql_error());

if($query){//If query successfull
    if(mysql_affected_rows()!=0){//and if atleast one record is found
        echo '
        <tr>
            <th>Clinic Name</th>
            <th>Phone Number</th>
            <th>Location</th>
        </tr>';
        while($rows = mysql_fetch_array($query)){ //Display the record
            $replace = str_replace(" ", "-", $rows['ClinicName']);
            echo '
            <tr>
                <td><a href="clinic.php?userid='.$rows['UserID'] .'">'.$rows['ClinicName'].'</a></td>
                <td>'.$rows['Phone1'].'-'.$rows['Phone2'].'-'.$rows['Phone3'].'</td>
                <td>'.$rows['LocationCity'].', '.$rows['LocationRegion'].' '.$rows['LocationZip'].', '.$rows['LocationCountry'].'</td>
            </tr>';
        }
    }
    else {
        echo 'No Results for:<br />Clinic Name: '.$keyword.'<br />City: '.$city.'<br />State: '.$state.'<br />Country: '.$country.'';//No Match found in the Database
    }
}
else {
    echo 'Parameter Missing in the URL';//If URL is invalid
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:38:08+00:00Added an answer on June 3, 2026 at 7:38 am

    IE won’t let you innerHTML a table. You can find this information here: Microsoft

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a site on linux server(my testing host server). But When I
It's my first time asking here (I have visited the site several times, but
I developed a wordpress plugin entirely on localhost and tested it on a live
I have a site developed in ASP.NET and hosted on a windows server using
I have this live search which works perfect until a company name in my
I have a big problem. There are devices in live that send the URL
I have developed a set of apis that live on an asp.net mvc application,
We have developed chat module using node.js() and mongo sharding and gone live to
I have developed an application in symfony which will have to be made live
I have developed a site, took a back up on the development site. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.