coder3
coder3

Reputation: 367

AJAX request with Zend Form

How do I submit a Zend form using ajax request with jquery so that the page does not refresh? I've used ajaxLink with Zend but I don't see how I can use it with a form..

Upvotes: 0

Views: 907

Answers (1)

S L
S L

Reputation: 14328

Well, I don't know if there exists any inbuild function for form ajax submit in zf. But you can accomplish this normal way.

One way is to append js file

$this->jQuery()->addJavascriptFile('//path to you jquery form submit script')

In other way you can add form submitting function on onLoad function

$function = "//some jquery-ajax form submit script"

$this->jQuery()->addOnload($function)

Upvotes: 1

Related Questions