| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Help adding basic javascript code to /customer/home.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I am trying to add the following small piece of Javascript to /customer/home.tpl so I can have a jump menu on the page:
<script type="text/javascript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> However it doesn't work. When I view the source code of the live page for some reason xcart keeps changing the code to: <script type="text/javascript"> <!-- function MM_jumpMenu(targ,selObj,restore)//--> </script> Even if I place the code just before the </head> tag. Why does it do this? Where should or could I put this code so that xcart wont stuff it up? Thanks! ![]() ON EDIT: I just tried another more basic javascript and it did the same thing! Changed this: <script type="text/javascript"> function changepage(obj) { window.location.href = obj.value; } </script> to this: <script type="text/javascript"> function changepage(obj) </script>
__________________
Xcart Version 4.1.9 [win] |
|||||||
#2
|
|||||||
|
|||||||
![]() You need to put literal tags around any JS
{literal} javascript here {/literal}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() Argh! All this time it was so simple. Thanks so much for your help
![]()
__________________
Xcart Version 4.1.9 [win] |
|||||||
|
|||
X-Cart forums © 2001-2020
|