X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   JAVASCRIPT IN TEMPLATES (https://forum.x-cart.com/showthread.php?t=1678)

stinkfoot 02-28-2003 09:42 AM

JAVASCRIPT IN TEMPLATES
 
im trying to put an image with a javascript popup but i need to put the javascript in the head of the page... what file am i looking for, where every page calls on it?

PLEASE HELP!!!

shan 02-28-2003 10:55 AM

skin1/customer/home.tpl

RazorWriter 05-09-2003 09:24 AM

is javascript even possible?
 
I get Smarty errors whether I put a javascript in home.tpl, or the actual body of the page I'm working on.
the script is:

Code:

<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>


and the error:

Fatal error: Smarty: [in help/customer_service.tpl line 6]: syntax error: invalid attribute name - 'window.open(theURL,winName,features);' in /home/www/urbanhomemaker/store/Smarty-2.3.0/Smarty_Compiler.class.php on line 1398

shan 05-09-2003 09:32 AM

Just remember that any JS parts that include the { or } should be in {literal} {/literal}tags

do a search for literal for some more examples on using java in your templates


All times are GMT -8. The time now is 01:47 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.