【发布时间】:2011-06-15 04:45:50
【问题描述】:
我有一个选择框,我想用它来 Ajax 更新页面上的一些其他内容。所以我使用 JsHelper (jQuery) 绑定了一个事件处理程序,如下所示:
<?php
echo $this->Form->select('car', $cars);
$this->Js->get("#car");
$this->Js->event('change', $this->Js->request(array(
'controller' => 'cars',
'action' => 'view',
???,
array('async' => true, 'update' => '#car-view', 'evalScripts' => true),
true
));
?>
但是我怎样才能获得选择框的值作为参数发送给汽车控制器(在上面代码中的“???”处)?
我可以在 javascript 中做所有事情,但是有什么方法可以在 cake 中做到这一点?
【问题讨论】:
标签: javascript cakephp helper drop-down-menu