we are already that far. The problem is javascript within that
ajax generated html that is not interpreted correctly when using ajaxLink
and inline onClick rendering.
On Wednesday 03 December 2008 17:49:31 Daniel Latter wrote:
> Hi again,
>
> You may want to look at Ajaxcontent and ContextSwitches in the
> manual , with these you can fire of an ajax request to a controller
> action and have it return HTML you can then use in your current view:
>
> class CommentController extends Zend_Controller_Action {
>
> public function init()
> {
> $ajaxContext = $this->_helper->getHelper('AjaxContext');
> $ajaxContext->->addActionContext('process', 'html') //
> processAction method
> ->initContext();
> }
>
> public function processAction()
> {
> $this->_helper->viewRenderer->setNoRender();
> $form = new BlogCommentForm();
> // Process a new comment
> // Return the results as JSON; simply assign the results as
> // view variables, and JSON will be returned.
> if ($this->_request->isPost()) {
> $formData = $this->_request->getPost();
> if ($form->isValid($formData)) {
> $posts = new BlogComments();
> $row = $posts->createRow();
> $row->comment = $form->getValue('comment');
> $row->postID = $form->getValue('postID');
> $row->save();
> $this->view->comment = "Your comment has been
> added";
> } else {
> $form->populate($formData);
> }
> }
> }
> }
>
> On Dec 3, 2008, at 16:13, vladimirn <[EMAIL PROTECTED]> wrote:
> > Hello Benjamin, thanks for your response.
> > Are you saying that ajaxLInk could be used only to display pages
> > which must
> > not have javascipt inside?
> > So, only plain text and html without javascript will work?
> > If so, i really dont see real use for it except to play and have ONE
> > quickly
> > loaded page.
> > Also, no one told me WHY link name is out of href tags. I copied
> > that part
> > of page source above, so i think that i have ajaxLink inside ajaxLink
> > requested page, but its missformated. I dont know.
> > So i must abandon jQuey for now, considering i dont have any
> > knowledge about
> > javascript and dont know to write any.
> > Thanks,
> > V
> >
> > beberlei wrote:
> >> Hello vladimirn,
> >>
> >> this is just not possible as i said earlier. You have to find a
> >> generic
> >> jQuery
> >> by hand written solution for this. I have tested myself if its
> >> possible
> >> with
> >> the inline argument, but that gives javascript errors.
> >>
> >> The problem is the following. The ajaxLink helper puts jQuery code
> >> onto
> >> the
> >> jQuery Helper stack. When you render from ajax the stack has
> >> already been
> >> outputted to the view, so its missing the hooks for the "new links".
> >>
> >> If you write some generic javascript yourself you can circumvent this
> >> problem
> >> rather easy.
> >>
> >> greetings,
> >> Benjamin
> >>
> >> On Wednesday 03 December 2008 16:36:02 vladimirn wrote:
> >>> Thank you Daniel,
> >>> i already have this added in my bootstrap.
> >>> At least you have read my post :)
> >>>
> >>> ajaxLink works ok . But i need to have ajaxLink inside requested
> >>> ajaxLInk
> >>> content.
> >>>
> >>> Is my english to bad, or no one here can give me an answer? :)
> >>> I really want thats about my english and that i dont know to
> >>> explain :)
> >>> If anyone thinks that could help on this, i will explain it over and
> >>> over,
> >>> and make things clear :0)
> >>>
> >>> Thanks in advance,
> >>> V
> >>>
> >>> dan.latter wrote:
> >>>> you need
> >>>>
> >>>> $view->addHelperPath("ZendX/JQuery/View/Helper",
> >>>> "ZendX_JQuery_View_Helper");
> >>>>
> >>>> in your view I think as this is JQuery related.
> >>>>
> >>>> Thank You
> >>>> Daniel Latter
> >>>>
> >>>> 2008/12/2 vladimirn <[EMAIL PROTECTED]>:
> >>>>> Anyone pls?
> >>>>>
> >>>>> --
> >>>>> View this message in context:
> >>>
> >>> http://www.nabble.com/QUestion-about-jQuery-ajaxLink--can-anyone-take-a
> >>>-
> >>>
> >>>>> look-on-this-please--tp20732925p20795245.html Sent from the Zend
> >>>>> Framework mailing list archive at Nabble.com.
> >>
> >> --
> >> Benjamin Eberlei
> >> http://www.beberlei.de
> >
> > --
> > View this message in context:
> > http://www.nabble.com/QUestion-about-jQuery-ajaxLink--can-anyone-take-a-l
> >ook-on-this-please--tp20732925p20816016.html Sent from the Zend Framework
> > mailing list archive at Nabble.com.
--
Benjamin Eberlei
http://www.beberlei.de