"onchange" event everything works as intended and dijit.byId is
defined but I get the error "dijit is undefined" for "onload". What
did I miss or do wrong? Many thanks for advices in advance.
In the View:
<?php
$this->dojo()->enable()
->setDjConfigOption('parseOnLoad', true);
$this->dojo()->javascriptCaptureStart();
?>
function test() {
alert(dijit.byId("id"));
}
<?php
$this->dojo()->javascriptCaptureEnd();
$this->dojo()->onLoadCaptureStart();
?>
alert(dijit.byId("id"));
<?php
$this->dojo()->onLoadCaptureEnd();
echo $this->form;
?>
In the Form:
$this->addElement(
...
array(
'onchange' => 'test()',
)
);
没有评论:
发表评论