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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:24:15+00:00 2026-05-14T04:24:15+00:00

Working on an AJAX website (HTML,CSS,JavaScript, AJAX, PHP, MySQL). I have multiple javascript functions

  • 0

Working on an AJAX website (HTML,CSS,JavaScript, AJAX, PHP, MySQL).
I have multiple javascript functions which take rows from mysql, wrap them in html tags, and embed them in the HTML (the usual usage of AJAX).

THE PROBLEM:

Everything is working perfect, except when I run the site with Firefox (for once its not InternetExplorer causing the trouble).

The site is currently in the developmental stage, so its offline, but running on the localhost (WampServer, apache, Windows XP SP3,VISTA,7).

All other cross-browser conflicts have been removed, and works perfectly on all major browsers including IE, Chrome, Opera and Safari, but I get absolutely nothing from the HTTPRequest (AJAX) if the browser is Firefox.

All browsers have the latest versions.

THE CODE:

I have a series of javascript functions, all of which are structured as follows:

function getDatay(){
  var a = document.getElementById( 'item' ).innerHTML;
  var ajaxRequest;
     try{//Browser Support Code:
      // code for IE7+, Firefox, Chrome, Opera, Safari:
      ajaxRequest = new XMLHttpRequest();
     } catch (e){
          // code for IE6, IE5:
      try{
       ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
       try{
        ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (e){
        // Something went wrong
        alert("Your browser is not compatible - Browser Incompatibility Issue.");
        return false;
       }
      }
     }
     // Create a function that will receive data sent from the server
     ajaxRequest.onreadystatechange = function(){
      if(ajaxRequest.readyState < 4){
          document.getElementById( 'theDiv' ).innerHTML = 'LOADING...';
      }
          if(ajaxRequest.readyState == 4){
                      document.getElementById( 'theDiv' ).innerHTML =  ajaxRequest.responseText;
      }
     }
     //Post vars to PHP Script and wait for response:
     var url="01_retrieve_data_7.php";
          url=url+"?a="+a;
     ajaxRequest.open("POST", url, false);//must be false here to wait for ajaxRequest to complete.
     ajaxRequest.send(null);
}

My money is on the final five lines of code being the cause of the problem.

Any suggestions how to get Firefox and AJAX working together are most welcome…

  • 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-14T04:24:15+00:00Added an answer on May 14, 2026 at 4:24 am

    Had to post the jquery one-liner that bunch of code translates into!

    $("#theDiv").text("LOADING...").load("01_retrieve_data_7.php?a="+$("#item").text());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 377k
  • Answers 377k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Just put a User-agent: * Disallow: /siteB in the robots.txt… May 14, 2026 at 8:53 pm
  • Editorial Team
    Editorial Team added an answer Can you explain further? You want to grab the referrer?… May 14, 2026 at 8:53 pm
  • Editorial Team
    Editorial Team added an answer Adjust this to fit your requirments... protected void Page_Load(object sender,… May 14, 2026 at 8:53 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.