Ah...an easy one. All curly braces in your script must be enclosed in smarty {literal} tags to keep smarty from mistaking the javascript braces as smarty template tags. I usually just enclose the whole script in literal tags unless I need to substitute smarty variables into the actual javascript. So it would look like this in your template.
Code:
{literal}
<SCRIPT language=JavaScript1.2>
<!--
function popup_cvv2_instructions(product_id) {
var w = "420"; //width of popup window
var h = "420"; //height of popup
window.open('/path/to/cvv2/instructions.html',"cvv2 help window","width="+w+",height="+h+",resizable,scrollbars=yes");
}
-->
</SCRIPT>
{/literal}
Then on your link or button you want to use to open the window, you'd do this:
or you could put the exact same syntax from the above href into an onClick event for a button or whatever.
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.