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

  • Home
  • SEARCH
  • 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 341609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:43:30+00:00 2026-05-12T10:43:30+00:00

This is a long one, The Premise Was called in to help out a

  • 0

This is a long one,

The Premise

Was called in to help out a client with some bug fixing on a current project of theirs. What needed fixing was a jobs listing page. You have a list of jobs, you click one and if JavaScript is activated an AJAX call is made to dynamically load the job’s details into an existing element (DIV#emploi_details). If JS isn’t activated, it simply reloads the page with the job’s details (less important).

I jumped onto their lab servers to work on the dev website.

The Problem

Basically, IE7 (at first) wasn’t displaying the content loaded via $().load(). IE6 worked without a hitch with innerHTML. Requests are sent and I get a reply every time. I receive the data, I can alert() it and see it but the actual dumping of the content doesn’t work. Safari, Firefox, no problems. The DIV#emploi_details element I’m loading info into has a CSS display:none; in its styleheets and is shown after content is loaded in (other not so important detail).

show_emploi = function(id, succ_id)
{
    $('#emploi_details').fadeOut(800, function() {
        var $$ = $(this);

        $$.load('emploi_<?php echo $data['lang']; ?>.php', { job_details: 1, ajax: 1, id: id, succ: succ_id, random: (new Date().getTime()) }, function(data, status){
            if (isIE6) document.getElementById('emploi_details').innerHTML = data;
            $$.show();
        });
        $('#bgContent').fadeOut();
    });
}

The Solution

At first I was under the impression maybe the $().load() was just acting up, so I changed it for a $.get() for more control over the manipulation of the loaded content.

$.get('emploi_<?php echo $data['lang']; ?>.php', { job_details: 1, ajax: 1, id: id, succ: succ_id, random: (new Date().getTime()) }, function(data, status){
    $$.empty().append(data).show();
});

This works. In all browsers including IE6 and IE7. No problem. Weird, but you know if it works and its fullproof, don’t ask questions.

The Plot Twist

Now here’s where shit gets weird. I considered the bug fixed and applied the solution to the live website and… it doesn’t work. IE just isn’t liking it. Baffled after trying $.ajax and all other sorts of stuff I end up using this for the live website :

$.get('emploi_<?php echo $data['lang']; ?>.php', { job_details: 1, ajax: 1, id: id, succ: succ_id, random: (new Date().getTime()) }, function(data, status){
    document.getElementById('emploi_details').innerHTML = data;
    $$.show();
});

And it works on all browsers, because there’s nothing like barebones JS to get stuff done. Necessarily, this fix also works on the dev website.

The ‘To Be Continued’

There is something in the function of embedding of the content that isn’t clicking for all browsers (and clearly servers).

All in all, my question is a WTF question. I can’t understand why one works on one side and the same doesn’t work on the other side or even why it never worked properly in the beginning ($().load()). It’s clearly not different jQuery versions (1.2.6) since it was my first instinct to verify the framework version.

Anyway, interesting mystery IMO.

Hope someone out there in Stackland has the god-given answer.

Thanks

  • 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-12T10:43:30+00:00Added an answer on May 12, 2026 at 10:43 am

    I have solved the riddle! here is a working example of my problem.
    The trick was to call another AJAX after the first success, this will somehow override the problems with the innerHTML.
    Thanks guys for setting me to the right direction.

    I hope this will help some people, because so far i haven’t seen a working solution yet.
    I will also contact jQuery for this 😛

    $.ajax({
    url:'modifyarticle.php',
    type:'POST',
    data:{
     id:this.id,
     article:'something',
     mode:'single',
     action:'delete'},
    cache:false,
    success:function(msg) {
     alert(msg);$.ajax({
      url:'getall.php',
      type:'GET',
      cache: false, 
      success: function(data) {
       $('#output').html(data);
      }
     });
    }});
    

    salut

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

Sidebar

Related Questions

I know this one is going to be a long-shot, but I thought I'd
Premise: This Wikipedia page suggests that the computational complexity of Schoolbook long division is
this post is a long one sorry for that but the problem is complex
I've had this long term issue in not quite understanding how to implement a
I have this long and complex source code that uses a RNG with a
Compiling this lines long int sz; char tmpret[128]; //take substring of c, translate in
This is a long text. Please bear with me. Boiled down, the question is:
I know this is a long shot - but is there any way at
I got this idea a long time ago when i saw an app do
This is a bit of a long shot, but if anyone can figure it

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.