[fw-general] ZF with Ajax (Dojo or anything)

2009-07-16 Thread 411161

I have this problem where I am trying to show pieces of the form as the user
fills out more of the form. I was trying to do this in a way where the
entire form was on the phtml page, but pieces of the form were hidden by
using div with a style property of hidden. When an onClick is called or
onBlur, the javascript makes the call to the server via xhrPost or any kind
of XMLHttpRequest wrapper (for those not using Dojo) and goes to the server.

Here is the problem. I am setting view variables in my controller, but those
variables are only available if they are going to be displayed on the phtml
file that corresponds to the Controllers view. That makes sense. But what am
I supposed to do?

This has to be a common thing, but I just do not know how to address it. 


Please help.
-- 
View this message in context: 
http://www.nabble.com/ZF-with-Ajax-%28Dojo-or-anything%29-tp24517178p24517178.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] ZF with Ajax

2009-07-10 Thread 411161

I am just trying to figure out if I can do this or whether I am just doing it
wrong

I have a form that displays more of itself as the user fills in info. When
they choose from a select option it calls a javascript function via
Prototype which makes a request to the server for a controller. The issue is
this. The view variables from the controller are set to display for the
matching view template. But since I was using Ajax I had the other part of
the form hidden via a div:


rest of the form


The issue is that the div above is in the original page. So it does not see
any of the view variables from the controller. 

Is there a way to make it see those?


I know that I can take out what is in the div and put it into the view that
the controller is looking for, but I wanted to do it with all the code in
one page and using a display:none. Will I have to pull the code back out and
put it in the the view?





-- 
View this message in context: 
http://www.nabble.com/ZF-with-Ajax-tp24432700p24432700.html
Sent from the Zend Framework mailing list archive at Nabble.com.