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 8137291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:04:09+00:00 2026-06-06T11:04:09+00:00

I am using jquery autosuggest to populate the data in a text box. When

  • 0

I am using jquery autosuggest to populate the data in a text box. When i am trying to work that functionality in ie8 i am getting the error: console not define

The jquery code where it is showing error is :

function lookup(inputString) {
        if(inputString.length == 0) {
            // Hide the suggestion box.
            $('#suggestions').hide();
        } else {
            // post data to our php processing page and if there is a return greater than zero
            // show the suggestions box
            $.post("string_search.php", {mysearchString: ""+inputString+""}, function(data){

                **console.log(data.length)**
                if(data.length >0) {
                    $('#suggestions').show();
                    $('#autoSuggestionsList').html(data);
                }else{
                $('#suggestions').hide();
                }
            });
        }
    } //end

Please help me in solving the error

  • 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-06T11:04:15+00:00Added an answer on June 6, 2026 at 11:04 am

    Contrary to popular belief, the console exists in IE too. However console is not defined until after opening the Developer Tools (press F12). So unless the Developer Tools are already open when the page is loaded, then it will fail.

    One solution is to add something like the following to the top of your file (i.e. before you use console):

    <script>
        try {
            console.log('Hello console!');
        } catch(e) {
            console = {log: function(){}};
        }
    </script>
    

    This ensures that console.log is always available, even if it is a no-op.

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

Sidebar

Related Questions

I'm trying to create an autosuggest search box using jQuery UI and I would
I using this plugin http://code.drewwilson.com/entry/autosuggest-jquery-plugin While typing MAS there is no data matched, so
Using jQuery Ajax to fetch data from local server: it works well with IE8
I'm trying to populate an input field, using PHP/MySQL, with the Drew Wilson's jQuery
I am trying to implement eBay autosuggest in an opera extension using jQuery autocomplete.
Using jQuery I'm creating a basic 'tooltip' animation so that the tooltip will appear
Using jQuery I am trying to set focus for (CSS purposes) to a particular
I'm using this jQuery AutoSuggest Plugin. It's pretty well documented, but there is a
Using JQuery I am trying to perform validation and also get the values of
Using jQuery 1.6.2 HTML that I'm operating on <select id=langId> <option value=0>Argentina - Spanish</option>

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.