我如何使用cakephp 2.2 jshelper来调用其他jshelper函数?

时间:2013-02-09 10:25:41

标签: javascript cakephp cakephp-2.0

我有以下代码:

$this->Js->get('#get_meters_today')->event('click',
    $this->Js->request(
        array('action' => 'getMetersToday'),
        array('async' => true, 'update' => '#meters_today')
    )
);

$this->Html->scriptBlock(
    $this->Js->domReady(
        $this->Js->request(
            array('action' => 'getMetersToday'),
            array('async' => true, 'update' => '#meters_today')
        )
    ), array('inline' => false)
);

我想要做的只是编写Js->request一次,并由click方法和domReady方法引用。我该怎么做?

由于

0 个答案:

没有答案