Solved

jQuery Validation Issues

Posted on 2014-01-09
5
235 Views
Last Modified: 2014-01-10
I have a form and i am using the validation plug in.

All in all it works very well.. I have a few small issues though

1.When errors are picked up, it shows items in red, but when i clear those items, it doesn't always remove the error class and so the text box stays red until i click update again. This can be seen with the date items.

2. This is again connected to the first question. some of the items at the bottom of the form do not have the has-error class applied to it and so the error is displayed in grey as opposed to red.

from what i can tell, the problem is that the highlight and unhighlights aren't working correctly but i can't see why

basically, i want all errors to be in red and to highlight and unhighlight when they should

i've attached a link

many thanks

Test Link
0
Comment
Question by:maddisoncr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:maddisoncr
ID: 39768293
errors shown
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 500 total points
ID: 39768420
Validate your page here : http://validator.w3.org/

Don't forget ID attribute must be unique in a page
0
 

Author Comment

by:maddisoncr
ID: 39768680
I've fixed the untidy code in my main page and it has taken away the bug that was causing some errors to be red and some grey.

The only error remaining now is the one where, after selecting a date or a combo drop down. the error doesn't go.

Basically. if i type in a date via the keyboard, the error goes.. when i select via mouse it stays.. I am guessing something isn't being triggered correctly

It's the same with the combo drop down (Chosen). after selecting a new item. it doesn't change the validation

any ideas?

Thanks
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39768699
where to see that?
you should trigger("blur") or trigger("keyup") your date field when a date is choosen
0
 

Author Comment

by:maddisoncr
ID: 39770678
Thank you very much.. working now :-)
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question