标签: ajaxhelper

在JS Helper CakePHP中手动触发事件

我陷入困境.我正在使用JS Helper.我使用了以下代码.

<?php $this->Js->get('#client_id')
        ->event('change', $this->Js->request(array('action' => '../ajax/get_client_location_and_process'),
                   array('update' => '#client_location_process',
                     'async' => false, 
                     'dataExpression' => true,
                     'method' => 'post',
                     'evalScripts' => true,
                     'data' => $this->Js->serializeForm(array('isForm' => True, 'inline' => True))
                     )
                   )
        );
Run Code Online (Sandbox Code Playgroud)

我想在页面加载时触发更改事件.如果我使用document.ready方法,那么它无法正常工作.我无法找到JS Helper方法,我们可以在控件上显式触发一些事件.请建议代码如何在需要时在表单元素上执行类似JQuery trigger()的功能.

cakephp cakephp-2.1 cakephp-2.2 ajaxhelper

6
推荐指数
1
解决办法
2260
查看次数

标签 统计

ajaxhelper ×1

cakephp ×1

cakephp-2.1 ×1

cakephp-2.2 ×1