(on Sunday, 04 July 2010, 02:38 PM +0600):
> Zend Form knows how to handle ajax submit, look at the source code,
> don't remember the method name, but it is there for 100%
isValidPartial() is the method you're looking for.
The idea with it is to allow client-side scripting to do incremental
server-side validation; it ensures that the form and individual elements
arent't marked as "invalid" when it's still in an incomplete stage
(i.e., elements that have not yet been filled out won't be marked as
validation errors).
You still need to do the client-side scripting, however, for handling
both the partial-form submission, as well as handling the returned
information from form validation. Additionally, you will need to do some
logic on the server-side to perform the partial validation and return
information to the client.
> On Sun, Jul 4, 2010 at 12:59 PM, Abraham Block <atblock@gmail.com> wrote:
> > http://jquery.malsup.com/form/
> >
> > On Sat, Jul 3, 2010 at 2:27 PM, Enkhbilguun Erdenetsogt
> > <enkhbilguun@beregu.com> wrote:
> >>
> >> Hello,
> >>
> >> I'm building an admin interface, which has jQuery ajaxLink() navigation.
> >> If I hit some creating new content link, navigation will show a create form
> >> to content area of the layout.
> >> AjaxLink() perfectly retrieves the form, but I don't understand how to
> >> make the submit button to ajax button.
> >>
> >> I need achieve when I press Save (submit) button, the form automatically
> >> validates the form with Zend_Form, saves its values to the DB and give back
> >> the form if it was unsuccessful or forwards to the news list page if it was
> >> successful without refreshing the page because whole navigation are in
> >> ajaxlink so that every action can only be printed on some #content div.
> >>
> >>
> >> Thank you very much in advance.
> >>
> >>
> >> ---
> >> Enkhbilguun Erdenetsogt
> >
> >
>
--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
没有评论:
发表评论