Thank you very much both, batoon and Dillon.
I solved the calling problem, I call validateAction in visitor.php ( which
also includes registerAction, from its view page ajax calls validation)
using '/validate', it works:
xmlHttp.readyState showed 4, and xmlHttp.status 200.
However, when printing xmlHttp.responseText, it displayed content of my
another application's xmlHttp.responseText.
I think there must be something wrong with cache, but how should I do with
the zend framework's cache  in this case?

Best regards



minglee wrote:
> 
> I am new to Zend Framework(ZF), and got confused when coding ajax:
> 
> 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/?
> 
> 2. After handle the HttpRequest in visitor.php, how shall I output HTTP
> response, shall I use something $view->render() or just "echo $response;"
> ?
> 
> Anyone can help with the above problems?!
> 
> Many thanks!
> 

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

Reply via email to