How to get value of Form Element to Validate
Need to get the value from Form Elements to validate.
Not sure what works in jQuery.
Have tried this (below) but it gives an error "formElement.find(" is not a function.
- function enableFastFeedback(formElement) {
- var nameInput = formElement.find("#name");
- var passwordInput = formElement.find("#password");
- var messageInput = formElement.find("#message");
- var checkboxInput = formElement.find("#checkbox");
-
- nameInput.blur(function(event) {
- var name = $(this).val();
- validateNameField(name, event);
- if (!isValidName(name)) {
- $(this).css({"box-shadow": "0 0 4px #811", "border": "1px solid #600"});
- } else {
- $(this).css({"box-shadow": "0 0 4px #181", "border": "1px solid #060"});
- }
- });
Any hints or help would be appreciated.