| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
javascript in home.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi
i am trying to put some javascript into customer/home.tpl, but im getting errors. the javascript is very simple, it opens a news browser windows with specified width, height etc. i put the following in the head: <script type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //--> </script> then i put the following in the body part of the page: <p onClick="MM_openBrWindow('http://www.sugarrays.co.uk/shop/skin1/pages/US/onlineForm.php','form','width=200,height=200')"><i mg src = "{$ImagesDir}/RegCatAd.gif" width="135" ></p> the error is get is: Fatal error: Smarty error: [in customer/home.tpl line 32]: syntax error: unrecognized tag: //v2.0 window.open(theURL,winName,features); (Smarty_Compiler.class.php, line 436) in /var/www/vhosts/sugarrays.co.uk/httpdocs/shop/Smarty-2.6.9/Smarty.class.php on line 1088 does anyone know how to put some javascript in home.tpl without getting errors. i need the javascript to open a new browser window, which would be opened at a specified height, width, no menu etc. thanks for any help
__________________
Using x cart 4.0.19 |
|||||||
#2
|
|||||||
|
|||||||
![]() You need to put literal tags around the JS in the head:
{literal} Javascript code {/literal}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|