This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes jquery.validate and tabber.js problems validating Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jquery.validate and tabber.js problems validating" Watch "jquery.validate and tabber.js problems validating" New topic
Author

jquery.validate and tabber.js problems validating

Mike Smith
Ranch Hand

Joined: Sep 23, 2005
Posts: 85
Hi.

Background:

I would like to have a message box at the top of the form that keeps track of the number of missing fields. The jquery.validate plugin works fine only for the first tab, the 2nd tab is not doing what I wish. Basically all I want to do is the following:
- have a tabbed form that is validated
- if the form fields are missing I wish to have the number of missing fields displayed in the message box.
- 2nd highlight or have the text "missing" displayed next to the field
- if text is entered into the field or if the check box is checked or radio button selected then update that field and remove the error message

Code snippet:


Just to re-iterate, the number of missing fields which are displayed in the message box (above form) appear to be correct when the form is validated (pressing submit - but missing fields exist). But only those fields on the first tab appear to work. For example, if a field is missing on the first tab it will have an error message displayed where I want it and if I enter in text or select a value, the error message disappears. In addition, the number of errors in the message box decrease in value. In contrast, the 2nd tab will display the error message but when you select something the error message does not disappear, nor does the number of errors in the message box decrease. I figure I need a way to iterate over each tab and validate fields to each specific tab instead of trying to validate the entire form at one time, but I am unsure how this is done using tabber.js and jquery.validate.js plugin.
Any suggestions greatly appreciated...
 
GeeCON Prague 2014
 
subject: jquery.validate and tabber.js problems validating