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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:29:02+00:00 2026-06-15T13:29:02+00:00

Despite the error, my problem has nothing to do with tabs I am using

  • 0

Despite the error, my problem has nothing to do with tabs

I am using jQuery to get a pretty large JSON file (almost 0.5 mb) and inserting a bunch of html from it into the DOM. This still works:

$(function() {
  $.getJSON('results.json', function(data){
    var result = $('<ul>');
    var resultEl = $('#results');
    for(var i = 0; i < 2; i++) {
      result.append(unescape(data[i].html));
    }
    result.appendTo(resultEl);
  });
});

I can insert two html parts fine, but when I try to insert three items this gets added to the DOM:

<section id="loading-tab" class="tab-content clearfix hidden">
  <h2 class="visuallyhidden">Loading</h2>
  <p>Loading...</p>
</section>
<section id="error-tab" class="tab-content clearfix hidden">
  <h2 class="visuallyhidden">Error</h2>
  <p>Error loading tab :(</p>
</section>

Here is a link where I try to insert 2 items (and it still works) and here is a link where I try to loop to 3 and everything breaks.

  • 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-06-15T13:29:02+00:00Added an answer on June 15, 2026 at 1:29 pm

    The third JSON element has a script tag that runs the following (the string of document.write is broken out for ease of reading)

    <script>
    document.write('
        <section id="loading-tab" class="tab-content clearfix hidden">
            <h2 class="visuallyhidden">Loading</h2>
            <p>Loading...<\/p>
        <\/section>
        <section id="error-tab" class="tab-content clearfix hidden">
            <h2 class="visuallyhidden">Error<\/h2>
            <p>Error loading tab :(<\/p>
        <\/section>');
    </script>
    

    Which is writing the Error loading tab :( to the page. Clean up the data and you should be good to go.

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

Sidebar

Related Questions

So I'm using jQuery validation and have managed (despite some out of date documentation)
we've got an almost-finished-ready-to-go magento shop, that has developed an annoying problem. On the
I encountered an error. Despite declaring the variables (failturetext and userName) errors still appear.
Despite using PHP for years, I've never really learnt how to use expressions to
This is a problem i wasn't able to solve despite extensive searches on the
Very occasionally, despite all testing efforts, I get hit with a bug report from
I have a piece of code here that does not work despite me using
I am using DotCMIS with no problem to connect to Alfresco and FileNet. I
A website I'm working on (using AS2 because it's oldschool) has a larger index
I cannot understand this error, despite my research throughout this website. At first the

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.