Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. jquery validation in drop down

jquery validation in drop down

Scheduled Pinned Locked Moved JavaScript
javascript
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shraddha_Patel
    wrote on last edited by
    #1

    jquery validation in Drop down.. if i am select the value another same div can't select this value.. and print the alerdy message "this value already selected"

    Z J 2 Replies Last reply
    0
    • S Shraddha_Patel

      jquery validation in Drop down.. if i am select the value another same div can't select this value.. and print the alerdy message "this value already selected"

      Z Offline
      Z Offline
      ZurdoDev
      wrote on last edited by
      #2

      There is no magic way to do it. You need to write code to do it. Write code for the change event of the dropdown. Check if it's value is already selected. If so, display a message and reset the dropdown selected value.

      Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

      M 1 Reply Last reply
      0
      • S Shraddha_Patel

        jquery validation in Drop down.. if i am select the value another same div can't select this value.. and print the alerdy message "this value already selected"

        J Offline
        J Offline
        jkirkerx
        wrote on last edited by
        #3

        Just remove the value from the next select using JQuery Then if they change the first value, add the value back, or reload the values in the next select

        If it ain't broke don't fix it Discover my world at jkirkerx.com

        1 Reply Last reply
        0
        • Z ZurdoDev

          There is no magic way to do it. You need to write code to do it. Write code for the change event of the dropdown. Check if it's value is already selected. If so, display a message and reset the dropdown selected value.

          Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.

          M Offline
          M Offline
          Member_14985346
          wrote on last edited by
          #4

          $("#everything").validate({
          onsubmit: true,
          rules: {
          dd1: {
          required: {
          depends: function(element) {
          return $("#dd1").val() == "none";
          }
          }
          },
          messages: {
          dd1: {
          required: "Please select an option from the list, if none are appropriate please select 'Other'",
          },
          }
          });

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups