[eluser]Unknown[/eluser]
it's code not working...
Controller
Code:
//it's done, if make one region name java
$this->template->write('java','[removed]alert("Hello!")[removed]');
$this->template->write('content',base_url());
//but this not working
$this->template->add_js('alert("Hi")','embed');
$this->template->render();
autoload
Code:
$autoload['libraries'] = array('database','datamapper','template');
config Template
Code:
$template['default']['template'] = 'template';
$template['default']['regions'] = array(
'content',
'java'
);
$template['default']['parser'] = '';
$template['default']['parser_method'] = '';
$template['default']['parse_template'] = FALSE;
View Template
Code:
<?= $_scripts ?>
<?= $_styles ?>
<?php print $java ?>
What is wrong ??? not throwing error, warning... and no show the line alert("Hi")
follow the guide and not working..