in my index.phtml I have this:
<? $this->dojo()->javascriptCaptureStart()?>
onload = load();
function load(){
sendMsg();
}
<? $this->dojo()->javascriptCaptureEnd()?>
In the main layout (main.html) I import the file with all my js function:
<head>
...
// HEADSCRIPT
// ...My js
$this->headScript()->appendFile(BASE_URL_REWRITE.'/js/myFunction.js');
echo $this->headScript();
..
In myFuntion.js there is:
function sendMsg(){
alert("Message");
}
But it doesn't work!!
With firebug I can see the correct script from myFunction.js in the <head>.
Please help me.
Thanks
--
View this message in context: http://www.nabble.com/dojo-and-javascript-functions-tp20378491p20378491.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论