Author Topic: Ajax on Zend Framework  (Read 1495 times)

0 Members and 1 Guest are viewing this topic.

Offline phpdeveloper82Topic starter

  • Irregular
  • Posts: 45
    • View Profile
Ajax on Zend Framework
« on: February 24, 2010, 04:40:06 AM »
I have started studying Zend Framework for my new project and now ready to start the work. But I didn't get much help in adding Ajax to Zend Framework. I am familiar with JQuery and wish to use the same on Zend Frame work also.

Please send some good tutorials which helps me to understand the working of Ajax with Zend Framework.

Offline thorpe

  • Administrator
  • 'Mind Boggling!'
  • *
  • Posts: 29,255
    • View Profile
Re: Ajax on Zend Framework
« Reply #1 on: February 24, 2010, 04:49:56 AM »
Nothing special to learn really. Your Javascript goes into js files which are included via the headScript helper. Your markup goes into your views as normal, then you make requests to controllers via a url. You can then have your actions check the request was made via the XMLHttpRequest object by using the controller objects isXmlHttpRequest() method. From there you can use Zend_Json to respond.

Offline phpdeveloper82Topic starter

  • Irregular
  • Posts: 45
    • View Profile
Re: Ajax on Zend Framework
« Reply #2 on: March 01, 2010, 10:01:26 AM »
Thank you for your reply. But there are few things if goes advanced Ajax with JQuery on Zend Framework. But at the same time, we can develop ajax application easily as the same way we do in the in normal php coding.

Steps:

1. Include jquery library in the layout

2. Create a Helper Class and include different js file to handle ajax request based on controller and function name or write the JQuery directly to the phtml page.


I would like to share a good link with you:

http://www.zendcasts.com/