[validate] remote method delay/disable onkeyup or something
Hello all,
I have seen numerous posts about this but can't sift out the current "accepted" solution to this problem.
I am struggling with the validate plugin's remote method. I'm on version 1.6 of the plugin. My problem is with the timing of the remote method. In firefox, when I first type in a name inside a text field that has the remote method it will only validate once I click to submit. This is all fine, except the way I handle if the entries are valid on the form is I use
if $(".something").valid(){ blah blah blah };
... one of the blah's being that I close the modal window that the form lives on. Because of the time the remote method takes, the validator appears to initially, for 200ms, think the form is valid, and will close my modal, but never submit. I considered, instead, setting a variable to "valid" and placing only that inside "blah blah blah" and then testing that variable for valid or invalid before closing the modal, but that feels quite hacky.
Similarly, IE6 struggles with the remote method. while I can see firefox aborting tons and tons of the remote requests and not doing any of the error display stuff, IE doesn't really "abort" and go by the latest request. IE just keeps flickering the error message on and off and on and off as I type, presumeably because it just can't keep up. On occasion, the error message sticks, even if the entry is valid.
Can someone recommend a way for me to make remote a bit more agreeable? Can I restrict remote to only work on submit, regardless if a previous entry had been incorrect? Anyone else have any advice for dealing with the time it takes for the remote to validate? Thanks!!