CodeIgniter Forums
add_js () not working,Template Library 1.4.1 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: add_js () not working,Template Library 1.4.1 (/showthread.php?tid=30407)



add_js () not working,Template Library 1.4.1 - El Forum - 05-13-2010

[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..


add_js () not working,Template Library 1.4.1 - El Forum - 06-15-2010

[eluser]kpspoke[/eluser]
did you ever get this figured out? i am having the same issue.

If not lets share what we have discovered to try and get it resolved. let me know.

Thanks