• Post Reply Bookmark Topic Watch Topic
  • New Topic

jQuery Validator and select

 
K Mansoor
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to disallow form submission if SELECT'ed OPTION is 7, however the validation method never gets invoked, the rest of validation works fine.



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65666
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using the validation method management incorrectly.

Here's a page I set up that demonstrates how I would go about it:



Note how much more general it is than your hard-coded approach.
 
K Mansoor
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clean, terse, beautiful!

Thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65666
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The validation plugin is really useful, but it can be hard to know how to use its advanced features. I still have a lot to learn about it myself!

Glad this helped get you going!

 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!