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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:19:57+00:00 2026-05-25T12:19:57+00:00

I am using the HTML_AJAX package in PEAR (admittedly an old library, but it

  • 0

I am using the HTML_AJAX package in PEAR (admittedly an old library, but it has worked fine for me for a couple of years and I don’t want to leave my infrastructure).

The problem I am having is that with the introduction of Firefox 4, and now also Firefox 5, JavaScript that is included in responses using HTML_AJAX.replace(div_target, request_page) [API is to replace div_target with the response from request_page] has stopped working.

It works fine on Chrome, IE9, Android, iPhone, etc. but not FF4/5.

Is this some sort of new feature, security mechanism, or just a plain old bug? If it’s a bug, is it a bug with HTML_AJAX (i.e. you can do it with jQuery?) or is this something FF needs to fix?

Example.

This page exists:

<script type="text/javascript" language="JavaScript">
    function do_replace(){
        HTML_AJAX.replace("something", "index.php?key=value"); // index.php will have html mixed with JS and paste it to the div "something".
    }
</script>
<div id="something" onclick="javascript:do_replace()">This text is to be replaced</div>

And this is index.php:

BLA BLA BLA some text maybe a <div> or something
<script type="text/javascript" language="JavaScript">
    alert("this has worked before, but stopped working on FF4&5 still works on Chrome Android etc.");
</script>

I tried finding the answer to this by searching but couldn’t find anything conclusive. I appreciate any help I can get on this.

BR Erik.

  • 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-25T12:19:57+00:00Added an answer on May 25, 2026 at 12:19 pm

    This is how I solved it.

    Replace

        var good_browser = (navigator.product == 'Gecko');
    

    With

        if(navigator.product == 'Gecko'){
            var regex_gb = /Firefox[\/\s](\d+\.\d+)/;
            if(regex_gb.test(navigator.userAgent)){
             var ffversion = new Number(RegExp.$1);
                if(ffversion >= 4){
                    var good_browser = false;
                }else{
                    var good_browser = true;
                }
            }else{
                var good_browser = true;
            }
        }else{
            var good_browser = false;
        }
    

    in the 3 files

    HTML_AJAX.js
    HTML_AJAX_lite.js
    util.js.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to start learning HTML and AJAX using a Linux distribution. Can anyone
I am using jQuery and Ajax. My MainFile has the following code: <html> <head>
When using Dojo 1.6, I can rename the core dojo package like so: <html>
I load some html using AJAX, this works fine, one of the bits that
Not just faster but better both in speed and using resources/memory. I have an
I have a form submit with an AJAX post. It works fine. But when
Want to upload a file using ajax for this using this uploader http://valums.com/ajax-upload/ and
I am working on ajax using struts 2 frame work. Application has two text
Web programmer here - using AJAX (HTML, CSS, JavaScript, AJAX, PHP, MySQL), but for
I am trying to load html asynchronously using jQuery ajax function. But I for

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.