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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:32:49+00:00 2026-05-11T18:32:49+00:00

Here is my code: $(‘#right’).load(‘textes.html #nicolas’); $(‘#right’).load(‘textes.html #antoine’); The problem is that the content

  • 0

Here is my code:

$('#right').load('textes.html #nicolas');
$('#right').load('textes.html #antoine');

The problem is that the content of the div antoine overwrites the content loaded by the div nicolas in the right div

div #right : load div nicolas from file textes.html = ok
div #right : load div antoine from file textes.html = overwrite content = No!

I’d like to append antoine to nicolas. This is to add nicolas and then add antoine so #right will be nicolas + antoine

I have tried to get the content into a var but it didn’t work.

Any idea ?


On top of that… I would like to add a rule <hr> BETWEEN each load


Maybe something like this, but this doesn’t work.

$('#right').load('textes.shtml #nicolas').append('<hr>').load('textes.shtml #antoine'); return false;
  • 1 1 Answer
  • 1 View
  • 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-11T18:32:49+00:00Added an answer on May 11, 2026 at 6:32 pm

    Maybe I’m missing something but it seems like you all have been missing the fact that this is an ajax call and you are calling functions procedurally and not as a callback function based on a successful ajax response.

    Besides, if you are doing anything more complex than loading some (X)HTML into an element, you should probably use one of the more powerful jQuery ajax methods (i.e., get() or post() or ajax()).

    Assuming you’ll get (X)HTML in the response:

    // Only ONE ajax call and very simply parsing... 
    $.get('textes.html', {}, function(data) {
        var $response = $('<div />').html(data);
        var $nicolas = $response.find('#nicolas')
        var $antoine = $response.find('#antoine');
        $('#right').append($nicolas).append($antoine);
    },'html');
    

    It’s really as simple as that.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have you tried using Session instead. It will be better… May 12, 2026 at 4:25 pm
  • Editorial Team
    Editorial Team added an answer For quick EmpID, see following: string xml = @"<div class=""details""><a… May 12, 2026 at 4:25 pm
  • Editorial Team
    Editorial Team added an answer Parse values, use std::mktime function to get time_t and now… May 12, 2026 at 4:25 pm

Related Questions

Here is my code: $('#right').load('textes.html #nicolas'); $('#right').load('textes.html #antoine'); The problem is that the content
I have a selectbox with month periods in it. Here is my code: $(function(){
well my problem is that, i have a form, which i want to validate
I couldn't find anything about getting the total JSON record count using jQuery. Here
I'm using the datepicker control for jquery and all is well except that I

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.