Jörn, or anyone else familiar with the jQuery validator and ajax

I am making a form that asks for the persons address, but when they
type in the zip code, I need to both check it from in a db and make
sure it's listed, and if it is, return the city and state.

I figured out the validator needs the ajax to specifically return the
text 'false' to be invalid, and anything else evaluates to valid.

But I need to take the response data and do stuff with it.  I tried
using:
remote: { success: function(){ ... } }
But it overwrites the default one.  I tried copying all the data from
the default into mine, but nothing happened then.

I was able to .bind ajaxSuccess to the body, but if I alert
(response.toSource()), it shows data:(void 0) no matter what and
undefined if I alert(response.data).

I can use:
remote: { complete: function(){ ... } }
But it doesn't have the data

How can I get the data back to play with without modding the validate
class?  I can use the complete call back if I can get the data.  If I
do need to mod it, I was just going to throw it into a global var at
the beginning of the success call.

Help,
  Adam

Reply via email to