own javascript in index.tpl possible?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Matthias
Regular
Posts: 47
Joined: Wed Mar 01, 2006 4:33 pm
Contact:

own javascript in index.tpl possible?

Post 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
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post 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
Matthias
Regular
Posts: 47
Joined: Wed Mar 01, 2006 4:33 pm
Contact:

Post by Matthias »

great, now it goes. Thank you.
Post Reply