[eluser]Unknown[/eluser]
Hi,
I need to call a javascript function from my controller.It is possible in codeigniter ?
Problem Details
My javascript file contains
Code:
function debugOutput(msg) {
alert (msg);
}
and also I need to call it from my controller.
I done it as follows.
Code:
<?php
function check()
{
header('Content-type: application/x-javascript');
// body here
}
?>
function execute() {
debugOutput("<?php echo 'test'; ?>");
}
execute();
But it is not working.Please help me to solve it.