Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

JAVASCRIPT IN TEMPLATES

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-28-2003, 09:42 AM
 
stinkfoot stinkfoot is offline
 

Member
  
Join Date: Feb 2003
Posts: 18
 

Default 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!!!
Reply With Quote
  #2  
Old 02-28-2003, 10:55 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

skin1/customer/home.tpl
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 05-09-2003, 09:24 AM
  RazorWriter's Avatar 
RazorWriter RazorWriter is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: Arizona, USA
Posts: 50
 

Default 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
Reply With Quote
  #4  
Old 05-09-2003, 09:32 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

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
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:03 AM.

   

 
X-Cart forums © 2001-2020