Hi Dillon.
My problem solved.
I should call in ajax /ZF_dir/controller/action, but I did
/controller/action.
Server log showed that error. And firebug showed several coding mistakes.

Cheers and thanks!



Dillon Woods wrote:
> 
> On 7/17/07, minglee <[EMAIL PROTECTED]> wrote:
> 
>> 1. Because ZF is using rewrite, how should I call the server-side action,
>> for example:
>> If I want to call registerAction in
>> /topath/application/controllers/visitor.php, can I call like
>> "/visitor/register"-- my .js file is in /topath/public/script/?
> 
> 
> Yes, that will work fine.  Your javascript function can send the
> XMLHttpRequest to any valid URL that you can access with a web browser.
> 
> 2. After handle the HttpRequest in visitor.php, how shall I output HTTP
>> response, shall I use something $view->render() or just "echo $response;"
>> ?
>>
> 
> I have a small writeup at http://dewoods.com/blog/view/id/3 showing how I
> use Zend_Json to return a response to an AJAX request.  If you just want
> the
> output of a view to be returned, then you don't have to do anything
> because
> the new viewRenderer helper will automatically do the equivalent of
> calling
> $view->render() for you.
> 
> Dillon
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Apply-ajax-in-Zend-Framework-tf4101038s16154.html#a11709663
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to