zend-frameworkjqueryzendx

Run javascript code returned when using Zend Frameworks ZendX ajaxLink function


I had this working an hour ago but must have changed something. How should I call a ajaxLink using ZendX so that any javascript in the response html get's executed? I tried with processData since I think I used that but now it doesn't work.

<?php echo $this->ajaxLink('Click me and I will run the returned javascript code',
                    $this->url(array('controller' => 'foo', 'action' => 'bar')),
                    array('id' => 'myid'),
                                'processData' => true,
                                'method' => 'post',
                                'async' => false
                    ),
                    array('a_posted_id' => $the_posted_id));?>

Solution

  • This SHOULD work and is probably just a bug somewhere in the ajaxLink() code. I ended up returning JSON encoded data and having javascript functions to act on the returned data instead.