我一小时前就开始工作了,但一定改变了一些东西。
我应该如何使用 ZendX 调用 ajaxLink 以便执行响应 html 中的任何 javascript?我尝试使用 processData
因为我认为我使用过它,但现在它不起作用。
<?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));?>
最佳答案
这应该有效,并且可能只是 ajaxLink()
代码中的某个错误。我最终返回了 JSON 编码的数据,并让 JavaScript 函数对返回的数据进行操作。
关于zend-framework - 运行使用 Zend Frameworks ZendX ajaxLink 函数时返回的 javascript 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4146729/