Page 1 of 1

own javascript in index.tpl possible?

Posted: Fri Mar 03, 2006 11:49 pm
by Matthias
I tried to put may own javascript in my "templates/templatepack/index.tpl" so I can use

Code: Select all

<a href="javascript:mypopup('http://myblog.de/sampleimage.jpg')"><img src="http://myblog.de/sampleimage_small.jpg"></a>
in entries. When I use javascript in index.tpl I become en error about bundled-libs/Smarty/libs/smartyclass.php or something.

How can I make that script run? Or isn´t it possible?

If you need original error message, I´ll do that again.

Thank you

Posted: Sat Mar 04, 2006 3:15 am
by carl_galloway
Matthias, do you have another bit of javascript in your index.tpl or is that it?

With smarty code all javascript {} need to be replaced by {ldelim} and {rdelim} otherwise you get the error you mention. Hope that helps. If not, maybe Garvin will have more answers.

Carl

Posted: Sat Mar 04, 2006 1:40 pm
by Matthias
great, now it goes. Thank you.