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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:27:25+00:00 2026-06-04T05:27:25+00:00

<span id=row-0 class=row> <span class=Foo> <select name=first[]> <option value=XX>XX</option> <option value=YY>YY</option> <option value=ZZ>ZZ</option> </select>

  • 0
<span id="row-0" class="row">
   <span class="Foo">
      <select name="first[]">
            <option value="XX">XX</option>
            <option value="YY">YY</option>
            <option value="ZZ">ZZ</option>
      </select>
   </span>
   <span class="Foo">
       <select name="second[]">
            <option value=""></option>
            <option value="AA">AA</option>
            <option value="BB">BB</option>
            <option value="CC">CC</option>
        </select>
   </span>
</span>

I have a row which have two different select. When ever both filled I want to show another row. How can it be achieved using jquery?

  • 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-04T05:27:26+00:00Added an answer on June 4, 2026 at 5:27 am

    I am not sure what you mean by adding a new row. But generally, this is what you are looking for. You need to catch the change event of the last dropdown and create a copy of the row and append to its parent. Assuming your row span is inside a div with class container, This should work for your HTML markup you provided.

    $(function(){   
        $(".container").on("change",".Foo:last",function(){
           var item=$(this);
           var rowClone=item.closest(".row").clone();   
           item.closest(".container").append(rowClone);
        });
    });
    

    Here is a sample : http://jsfiddle.net/Dbq3D/12/

    This wont validate whether both selects are filled because the mark up you provided has the first dropdown filled with a value already.

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

Sidebar

Related Questions

I have the following row in a table: <tr><td>Adric cut-out</td><td><span class=quantity>0</span></td><td>worthless</td></tr> I've already got
There is a table which has one row: <table> <tr><td><span class=removeItem></span></td></tr> </table> I use
I have this html: <div class=speaker-list> <div class=view-content> <div class=views-row views-row-1 views-row-odd views-row-first> <div
i have a span with class : cash_warn. I want to change the color
I have two span elements that I would like to stay on the same
I have model like this: class Kaart(models.Model): name = models.CharField(max_length=200, verbose_name=Kaardi peakiri, help_text=Sisesta kaardi
Here is HTML code: <div class=row> <span class=item><a href=#>A</a></span> <span class=item><a href=#>B</a></span> <span class=item><a
I have the following viewmodel: public class ViewModel { [Display(Name = firstname, ResourceType =
My php is this echo <li><a href='report_view.php?id= . $row['id'] . '>ID:(<span class='id'> . $row['id']
I have <div class='line'> <div class='chord_line'> <span class='chord_block'></span> <span class='chord_block'>E</span> <span class='chord_block'>B</span> <span class='chord_block'>C#m</span>

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.