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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:14:53+00:00 2026-06-17T07:14:53+00:00

What I want to do is that which ever options are display in the

  • 0

What I want to do is that which ever options are display in the “#studentadd” select box, I want to be able to remove ALL matching options from the #studentselect select box as well as empty the #studentadd select box. But at the moment it is not doing this.

What am I doing wrong?

Below is html of both select boxes:

Below is the select box #studentadd:

<select multiple="multiple" name="addtextarea" id="studentadd" size="10">
    <option value='1'>u08743 - Joe Cann</option>
    <option value='4'>u03043 - Jill Sanderson</option>
    <option value='7'>u08343 - Craig Moon</option>
</select>

Below is the select box the students should be appended into:

    <select id="studentselect" name="studenttextarea">
        <option value='1'>u08743 - Joe Cann</option>
        <option value='4'>u03043 - Jill Sanderson</option>
        <option value='7'>u08343 - Craig Moon</option>
</select>

Below is jquery:

$('#studentadd option').attr('selected', 'selected');

var selectedOption = $('select#studentadd');
$('select#studentselect').remove(selectedOption.html());
  • 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-17T07:14:55+00:00Added an answer on June 17, 2026 at 7:14 am

    Try

    var selectedOption = $('#studentadd').find(':selected');
    var studentSelect = $('#studentselect');
    selectedOption.each(function(){
        studentSelect.find('[value="'+this.value+'"]').remove();
    });
    

    DEMO

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

Sidebar

Related Questions

HI, i need a XML parser. i want to know that which one is
I have app in which i have recorded sound files i want that i
i have an input field which will be displayed. i want that to hide
I want to create a if statement that recognizes which string has been removed
I just want to know that can i make an application which have some
I want to search the program >> that is by which you append to
I want to know that how voice recognition in android works? Which library it
I have a Java WebStart application for which I want to specify that the
I have a JSON-like data structure (which I don't want to change) that is
I have around 100 rows of text that I want to tokenize, which are

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.