For my application I need to pass a parameter through zend to my exter javascript file. I need the server url in the javascript with the language parameter.
my javascript is placed in /js/javascript.js
I've tried the follow
layout.phtml
$this->headScript()
->prependScript('BASE_URL = "test";')
->appendFile('/js/javascript.js');
javascript.js
var url = BASE_URL
But my firebug console keeps saying that BASE_URL is not defined. What is the good way to do this?
Regards.
Nicky