![]() |
Adding Roll Over images
Hi - I've got some product images i'll ideally have on the bottom of every page as roll overs.
I've edited my home.tpl file with the roll over images and included a newly created roll.js file to handle the js. when i try and load the home page now - i get a smarty error Fatal error: Smarty error: [in roll.js line 1]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 580) in /homepages/34/d145649509/htdocs/mikan/store/Smarty-2.6.9/Smarty.class.php on line 1088 anyone have any ideas on how best to incorporate js into pages? |
You need to surround the js with literal tags:
{literal}script here{/literal} |
like this
Code:
{literal} |
No, it needs to surround the entire script, including the opening and closing javascript tags.
|
or this
{literal} { include file="roll.js" } {/literal} |
thanks balinor. I was able to figure it out.
found this site to be helpful as well http://www.phpfreaks.com/smarty_manual/page/language.function.literal.html |
Is there a trick to getting the embedded static pages to use js ?
tried the same approach as discussed above - doesn't seem to work here though |
Check the 'allow smarty in static pages option.
|
All times are GMT -8. The time now is 07:08 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.