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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:37:52+00:00 2026-05-30T12:37:52+00:00

I made a simple ajax live search in PHP and javascript. I used standard

  • 0

I made a simple ajax live search in PHP and javascript.

I used standard js ajax call script such as the one from w3schools.

http://www.w3schools.com/ajax/ajax_aspphp.asp

The function basically gets called onkeyup and php file returns a list of results such as the following:

<a href='javascript:void(0)' onCLick='example()'>example</a>

The problem is that the function exampe() gets called with a single click on ie and chrome whereas on firefox, it requires a double click to call exampe() (as if the page is not focused).

Is this a known issue with firefox? Does anyone experience something similar?

  • 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-05-30T12:37:54+00:00Added an answer on May 30, 2026 at 12:37 pm

    This fiddle http://jsfiddle.net/steveukx/GVbZU/ shows the code you’ve got above working fine, are you sure that the function you’re calling as the onclick handler exists? Firebug (or the Firefox built in console) should give you a pointer to any errors being thrown by your JavaScript.

    Instead of using the onclick attribute, you could event listeners attached by JavaScript instead, for example:

    HTML:

    <a id="exampleLink" href="#">example</a>
    

    JavaScript

    function example(evt) {
        // function run in the scope of the anchor element
    }
    document.getElementById('exampleLink').addEventListener('click', example, true);
    

    Note: the example above assumes that you’re not supporting IE <= 7, if you are, then you should check for the existence of addEventListener or the IE specific attachEvent instead, see http://www.quirksmode.org/js/events_advanced.html

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

Sidebar

Related Questions

I have made an Ajax request to a PHP script and that PHP script
I'm currently learning PHP. I've made a simple script @ http://hash.techho.me , only thing
I've made a simple implementation of an autocomplete which would call ajax and load
I have a simple ajax call like this: $.ajax({ url: u, type: POST, dataType:
I made a simple javascript class like this: function Horse() { this.color = 'brown';
Im trying to build a simple AJAX script that uses a form to send
Good evening, I made a well working function with php, mysql and ajax. A
Problem Cappuccino app initially loads successfully. After an ajax call is made and an
Am I missing something? I'm trying to do a simple ajax call using jquery
I want to use JavaScript to make a simple http get. I used jQuery

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.