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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:39:35+00:00 2026-05-25T21:39:35+00:00

I have few select’s which their content is loaded on DOM ready. It looks

  • 0

I have few select’s which their content is loaded on DOM ready.

It looks something like this:

<select id="select1"> </select>
<select id="select2"> </select>
<select id="select3"> </select>
<select id="select4"> </select>
<select id="select5"> </select>

and the javascript like this:

$(document).ready(function(){

    $("#select1").load("select1.html", 
             function (responseText, textStatus, XMLHttpRequest) {
               if (textStatus == "success") {
                     alert("success");
               }     
    }); 


$("#select2").load("select2.html", 
                 function (responseText, textStatus, XMLHttpRequest) {
                   if (textStatus == "success") {
                         alert("success");
                   }     
        });
    // and goes on for every select

EDIT:

Now, each select has different values. Select1 for countries, Select2 for colours, Select3 for currency etc. How can I combine all the options into 1 HTML/XML and load for each select its options from that 1 file.

Question 2: Is it better to load each select options its own file or have everything combined?

Note that now the content is loaded on DOM ready; for test purpose. In the feature I will be calling each select content separately. The reason I am loading the options is because each select has about 30 options and I want to reduce the loading time since the entire site its a 1 page dashboard web app with many select options.

  • 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-25T21:39:35+00:00Added an answer on May 25, 2026 at 9:39 pm

    You can just load fragments from a single page.

    Do it like this

    $("#select1").load("select.html #select1_content", //continue

    In this way, you are loading into #select1 the contents of the #select1_content from your single select.html page.

    See Loading Page Fragments here: http://api.jquery.com/load/

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

Sidebar

Related Questions

I have ran across a few queries that use this where condition: select ...
I have few tables: Exams UserExams UserExamQuestions UserExamAnswers Users ExamQuestions ExamQuestionAnswers this is select
I have few items on my ComboBox items collection, and i'd like to select
I have an iframe which contains a few select drop-down lists for data entry.
I have few checkboxes , out of which one is Select All and the
In my upload form I have a few select boxes. These are arranged in
I have a few SQL (Select/Update/Insert) syntax that I will run inside PL/SQL one
I have a select element with a few options. Depending on what is selected,
I have a dropdown list and a select list. Both contain quite a few
I have few question in this regard When you create an internet page, does

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.