开发者

Form post using motools ajax and form check with motools form check

开发者 https://www.devze.com 2022-12-13 23:16 出处:网络
I am using motools script for client side validation of web form. here is the link for that script http://mootools.floor.ch/en/demos/formcheck/

I am using motools script for client side validation of web form. here is the link for that script http://mootools.floor.ch/en/demos/formcheck/

My problem is that when only form validation is used and form is subimitting with normal method is fine but when form validation is used and form is submitting using AJAX with motools. so its not working.

So how could i do this both.

  1. Form Validation.
  2. A开发者_开发百科jax Form Submit.

Thanks Avinash


erm - formCheck seems to support submission by ajax natively. here are some options listed in the script head:

submitByAjax - you can set this to true if you want to submit your form with ajax. You should use provided events to handle the ajax request (see below). By default it is false.
ajaxResponseDiv - id of element to inject ajax response into (can also use onAjaxSuccess). By default it is false.
ajaxEvalScripts - use evalScripts in the Request response. Can be true or false, by default it is false.
onAjaxRequest - Function to fire when the Request event starts.
onAjaxSuccess - Function to fire when the Request receives . Args: response [the request response] - see Mootools docs for Request.onSuccess.
onAjaxFailure - Function to fire if the Request fails. 

etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消