-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ajax field validation with select menu #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
just a quick follow up if i put a alertTextLoad: "please wait" on the rule, that does pop up but never goes away. I get similar behavior out of your demo if I switch the first input to a select in firebug. |
yea it was never intended for selects, it probably is trying to check the value of a select, and it does not exist |
Hmm are you sure because the ajax form submit handles the selects perfectly. If I switch the ajaxfield validation to a funcCall that then calls my servlet via ajax that works, but then I run into the "issue'" of it not validating empty fields because required isnt attached. |
hmm will have a look soon |
I think the issue is here in the success portion of the _ajax: function(field, rules, i, options) var errorField = $($("input[id='" + errorFieldId +"']")[0]); In the form method you have: |
So this is the fix I've found , on line 1324 change: to: I have not tested extensively, but this seems to work for all input types (box, select, radio). |
thanks, make sense, I think :input works too, but im not sure about this line, it strange, it should be $("#"+ errorFieldId).eq(0) or something like that |
Do you have any demo's of using ajax field validation with select menus/drop down?
What is happening for me is the ajax call is being made on blur/change and my servlet is returning a proper json message [#id, false, "message"], but the prompt is never displayed, and it doesnt appear that any kind of error is registered. I also put an alert on the hook(per one of your demos) :
$("#formID").bind("jqv.field.result", function(event, field, errorFound, prompText){ console.log(errorFound) })
and that function is not being reached either.
If I change the select menu to an input box everything works as expected. ** The prompt IS displayed and works as expected with AjaxFormValidation **
If you have a working demo of using the ajax field validation on a select or radio , then I will regress to thinking Im doing something wrong. Otherwise, it may be a bug.
The text was updated successfully, but these errors were encountered: