ZAJDAN Posted February 12, 2016 Share Posted February 12, 2016 Hello, I am facing now similar problem... when I try to use greensock javascript code inside header.tpl: var logo = $("#landing-logo"); var time = 3.5; TweenMax.from(logo,2, {css:{top: "0px", scaleX:.2, scaleY:.2},ease:Strong.easeInOut}); so the web is not loaded and get: Failed to load resource: the server responded with a status of 500 (Internal Server Error) It is not a problem with the greensock library and my own gs code, because out of the presta web it runs fine it seems, that some php fight with execute the code I also have tried delete the js code from header.tpl and run the web...as the web was correctly loaded I run the js code via console and in this moment it works fine Thank You for any help Regards Zdenek Link to comment Share on other sites More sharing options...
ZAJDAN Posted February 15, 2016 Author Share Posted February 15, 2016 I have enabled dev mode and I have new info: Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/mnt/databox/www/www.shop.com/themes/default-bootstrap/header.tpl" on line 85 "TweenMax.from(logo,2, {css:{top: "0px", scaleX:.2, scaleY:.2},ease:Strong.easeInOut});" - Unexpected ":", expected one of: "}" <-- thrown in /mnt/databox/www/www.shop.com/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 85 Link to comment Share on other sites More sharing options...
safa Posted February 15, 2016 Share Posted February 15, 2016 try javascript code in literal tags {literal} //javasciprt codes {/literal} Link to comment Share on other sites More sharing options...
ZAJDAN Posted February 16, 2016 Author Share Posted February 16, 2016 (edited) Thank You for the hint all other what I have wrapped in <script> </script> inside header.tpl works without problem but the code which call greensock library not now I am trying put the code into {literal} {/literal} as You wrote me in this case the page is loaded completely, but the js effect is not executed even any other script which before worked corectly doesn't work now when is wrapped into literal Edited February 16, 2016 by ZAJDAN (see edit history) Link to comment Share on other sites More sharing options...
safa Posted February 16, 2016 Share Posted February 16, 2016 you have to use <script> to in literal tag {literal} <script type="text/javascript"> //javasciprt codes </script> {/literal} http://www.smarty.net/docsv2/en/language.function.literal Link to comment Share on other sites More sharing options...
ZAJDAN Posted February 16, 2016 Author Share Posted February 16, 2016 yes! now it works thank You! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now