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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:08:30+00:00 2026-06-10T12:08:30+00:00

Beginner. I have a tab control that has content loaded dynamically via links. These

  • 0

Beginner. I have a tab control that has content loaded dynamically via links. These are simple text files. So you click tab 3, it grabs the content from the text file and loads it. real basic.

On tab 2 i have a button that I want to get to tab 3 with passing an ID value. I can do this in the worst way possible to make it work but I have another issue. If i use:

$('#myTabs').tabs({selected:2});

it opens tab3 but it will not load the content. Everything else works fine, I just don’t know what I am missing, or doing wrong in order to get the content to load.

Appreciate any help as always!

This is what I have for loading the tabs

$(document).ready(function () {
   $('#myTabs').tabs({selected: '0'});  
});

<div id='myTabs'>
<ul>
<li><a href="#tabs-1">Overview</a></li>
<li><a href="/scripts/content2.txt">Content Area 2</a></li>
<li><a href="/scripts/content3.txt">Content Area 3</a></li>
</ul>
</div>

won’t bother with the content for tab 1…all this works. I can click any tab and get what I am suppose to get. so lets say that content3.txt contains this (also each text contain links to libraries and style sheets):

$(document).ready(function() {
     $('#testing').text('Hello World');
});

and content2.txt contains a button click event that switches to content3.txt:

$('#thisBtn').click(function () {
$('#myTabs').tabs({selected:2});
$('#myTabs').load('/scripts/content3.txt', function () {
   alert('worked');
});

the above wipes out the tabs…i guess because I am using the div that the tabs are contained within and loading different content to it? So my issue is that the div ‘texting’ is within the text file and doesn’t get loaded until the tab is selected? does that make sense.

finally how to I change this/ improve this? etc.

  • 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-10T12:08:31+00:00Added an answer on June 10, 2026 at 12:08 pm

    You are not loading any content from what you have given us, you are only switching tabs. You would have to use something like jquery load(). The below code will load the contents of myTextFile.txt into the element with the id of result.

    $('#result').load('myTextFile.txt', function() {
      alert('Load was performed.');
    });
    

    The general layout of jquery ui tabs is the following html:

    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Nunc tincidunt</a></li>
            <li><a href="#tabs-2">Proin dolor</a></li>
            <li><a href="#tabs-3">Aenean lacinia</a></li>
        </ul>
        <div id="tabs-1"></div>
        <div id="tabs-2"></div> <--- Load content into these divs
        <div id="tabs-3"></div>
    </div>
    

    As you can see each tab has an id assigned to it. You need to load the content into the correct div that corresponds with the tab you are wanting to load.

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

Sidebar

Related Questions

Beginner level question Scenario: Have simple string cocantation tool, that I might expand later
CoreData beginner I have a simple problem with CoreData. My model has two entities,
I have 2 files: one (ranges.txt) with rows that contain 2 tab-delimited integers, and
Absolute beginner question: I have a template file index.html that looks like this: ...
Love these forums, I am a beginner when it comes to VB.NET and have
VS beginner question. How to change parent control of a control? Example. I have
I am a beginner and have a simple question - I am creating a
I have another beginner's question that hopefully someone can help with. I'm trying to
I'm a beginner and have this simple script. My question is how to set
I have a C# Forms tab application. Each TabPage has a menu on 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.