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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:29:54+00:00 2026-06-13T10:29:54+00:00

Have gleaned much help from this site from reading the various posts over the

  • 0

Have gleaned much help from this site from reading the various posts over the years but am a bit stuck on this one and cannot seem to find an answer:

I’m displaying/replacing a drop down list which depends on the type of ‘table’ selected (via a radio button)

All works great…until I try to display a list that has been displayed before…i.e. when I click on a radio button twice I cannot get it to redisplay the list. I have also tried loading all the DIV HTML into an array and calling that so it must(?) be something to do with the append?

This is the HTML I am using. (The ‘max@times’ in the HTML is where I replace the list with my dynamically generated content – and creates all the various drop down lists in one shot and does not continually fetch them from the server)

<div id="selectarea"></div>
<div id="tables">
 <div id="tables2"><p><select id="select2" class="tables" name="tables2"><option value="">Please Select</option>" & max2times & "</select></p></div>"
 <div id="tables4"><p><select id="select4" class="tables" name="tables4"><option value="">Please Select</option>" & max4times & "</select></p></div>"
 <div id="tables6"><p><select id="select6" class="tables" name="tables6"><option value="">Please Select</option>" & max6times & "</select></p></div>"
 <div id="tables8"><p><select id="select8" class="tables" name="tables8"><option value="">Please Select</option>" & max8times & "</select></p></div>"
 <div id="continue"><p style="text-align:center;"><input type="button" id="now" value="Continue" name="now"></p></div>
</div>

My JQuery looks like this and does function ok (I was using the alert just to check that it was firing and the correct value was being passed!)

$("input:radio[name=tabletype]").live("click",function() {
                var value = $(this).val();
                alert("Button Click " + value);
                $("#selectarea").html("");
                var tblSel = $("#tables"+value);
                $("#selectarea").append(tblSel);
                });

Any help/ideas would be gratefully received!!!

Thanks,

GS

  • 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-13T10:29:56+00:00Added an answer on June 13, 2026 at 10:29 am

    You should append clone of your div. otherwise same element reference will get appended so new div will be created.

    $("input:radio[name=tabletype]").live("click",function() {
                      var value = $(this).val();
                         alert("Button Click " + value);
                          $("#selectarea").html("");
                         var tblSel = $("#tables"+value);
                         $("#selectarea").append(tblSel.clone(true).removeAttr("id"));
                    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a system tray app for Windows (with much info gleaned from this
Have converted devise new session from erb to Haml but doens't work, this is
I've set up a wordpress site using the information gleaned from http://codex.wordpress.org/Using_Subversion and other
have written this little class, which generates a UUID every time an object of
Have done quite a bit of searching for a guide (of any substance) for
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
have 2 questions : A computer with 32-bit address uses 2-level page table (9
have a nice day. I got problem when trying to create an image from
have tables like this Table checklist idCardno name permAddress datetime Table persons name idcardno
Have site with many languages extra languages are in subdomains on my server like

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.