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)
-   -   java error wanna take a look? (https://forum.x-cart.com/showthread.php?t=8607)

brett 07-23-2004 05:17 PM

java error wanna take a look?
 
Was trying to put this in product.tpl to add a pop up color chart.

Put in function in "top" with other java functions and put call in lower specifically under add to cart.
I keep ending up with errors and don't understand why, does someone?



{literal}
}
function popUp()
{popup=window.open('color chart.jpg', 'poppage, width=350 , height=450');}
{
{/literal}


<form>
<input type=button value="Open " onClick="javascript:popUp($ImagesDir}/color chart.jpg)">
</form>



thanks

B00MER 07-23-2004 11:30 PM

onClick="javascript:popUp($ImagesDir}/

should be:

onClick="javascript:popUp({$ImagesDir}/

brett 07-24-2004 04:47 AM

thanks Boomer,

it produces the button but with a syntax error and doesn't call correctly as the button doesn't do anything. :cry:

brett 07-24-2004 04:13 PM

ok here is how I got it without errors if anyone has similar woes.

function.

{literal}
}
function popUp()
{popUp=window.open('{$ImagesDir}/color chart.jpg, width=350, height=450')}
{
{/literal}


Call.

<form>
<input type=button value="Pop-up Window" onClick="javascript:popUp()">
</form>


More work to do, it can't find the image but at least no errors. I'm learning as I go so was happy with that for now.


All times are GMT -8. The time now is 04:20 PM.

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