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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:08:58+00:00 2026-06-16T22:08:58+00:00

I am building a form that will submit via ajax to a background page.

  • 0

I am building a form that will submit via ajax to a background page. I want to present options as a multiselect control, but with a “None of the Above” option.

The question is, is it possible to make this so that it impossible to select the “None” option AND still select other options? For example:

<select id="country" multiple="multiple">
    <option value>None</option>
    <option value="1">Jamaica</option>
    <option value="2">Cuba</option>
    <option value="3">France</option>
</select>​​​​​​​​​​​​​​​​​​​​​

It would be valid for users to select “None” alone, or “Cuba” and “France” together– but not “None” and “France”. So if a user selected “None” and then anything else, the “None” option would be unselected automatically?

I’m using jQuery in the page if that helps matters.

  • 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-16T22:08:59+00:00Added an answer on June 16, 2026 at 10:08 pm

    Strange requirements, but anyway this might work for you:

    $('#country').change(function() {
        if ($('option:first', this).is(':selected')) {
            $('option:not(:first)', this).prop('selected', false);
        }
    });​
    

    http://jsfiddle.net/zhKKw/

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

Sidebar

Related Questions

I'm building a login form composite component. The page that uses it will pass
I'm building a Windows Form that includes a combo box control, and I wanted
I'm new to PHP, and building a page that displays a customer order form
I'm building a login form that will validate the login against a database, then
Thank you for reading my question. I am building a form that will let
I'm building a review site that will allow users to submit reviews which will
Im building a form that will function like a keypad on a touch screen.
I'm building a form that will allow my site's users to set a secret
I'm building a page that has a search box that will populate a grid
I'm building a contact form that appears in a jQuery popup box. When you

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.