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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:25:41+00:00 2026-05-27T05:25:41+00:00

I have two plain html files. The first has a tree on the left

  • 0

I have two plain html files.
The first has a tree on the left from which you select a category and then it displays on the right the html file according to the selection.
the folder structure is /main/Pages, the main folder contains the main html and the Pages folder the child htmls.

The problem: IE & Firefox – work but do not load the styles of the child pages nor execute their document.ready functions
Chrome – 404 error

The jQuery behind it all:

$(document).ready(function () {
    $('.child').hide();
    $('.parent').click(function (event) {
        event.preventDefault();
        $('.child', $(this).parent()).slideToggle('slow');
    });

    $('a').click(function(event) {
        var innerText = $(this).attr('href');
        var elem = $('#' + innerText);
        if(elem.length > 0) {
            $('#container').load("Pages/" + elem[0].innerHTML + ".html", function(response, status, xhr) {
                if (status == "error") {
                    var msg = "Sorry but there was an error: ";
                    $("#container").html(msg + xhr.status + " " + xhr.statusText + " <b>"+elem[0].innerHTML+"</b>");
                }
            });
        }
        event.preventDefault();
    });
});

Chrome header:

Request URL:file:///D:/PacientData/Pages/labDemandeCode1.html
OPTIONS file:///D:/PacientData/Pages/labDemandeCode1.html HTTP/1.1
Access-Control-Request-Method: GET
Origin: null
Access-Control-Request-Headers: Origin, X-Requested-With, Accept

Any help regarding both problems would be highly appreciated!!

  • 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-27T05:25:42+00:00Added an answer on May 27, 2026 at 5:25 am

    Don’t use file:// when you’re testing AJAX stuff. It will not work very well. Put your files on a webserver, even if it is a local IIS of Apache server.

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

Sidebar

Related Questions

I have two large identical-sized files. One is ASCII plain text, and the other
From: http://doc.qt.nokia.com/4.7/signalsandslots.html Callbacks have two fundamental flaws: Firstly, they are not type-safe. We can
I have two input formats on my Drupal installation, namely: 'html' and 'plain text'.
Have two folders with approx. 150 java property files. In a shell script, how
I have two arrays of System.Data.DataRow objects which I want to compare. The rows
I have two identical tables and need to copy rows from table to another.
I'm looking to parse some HTML which is submitted from ckeditor. The HTML which
I have a file with two columns, one has the content type of HTTP
In my html page, I have two links located on the top of the
I have two buttons inside a form call: <% using (Html.BeginForm()) {%> <input type=submit

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.