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

java error wanna take a look?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-23-2004, 05:17 PM
 
brett brett is offline
 

Member
  
Join Date: Jun 2004
Posts: 10
 

Default 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
Reply With Quote
  #2  
Old 07-23-2004, 11:30 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

onClick="javascript:popUp($ImagesDir}/

should be:

onClick="javascript:popUp({$ImagesDir}/
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 07-24-2004, 04:47 AM
 
brett brett is offline
 

Member
  
Join Date: Jun 2004
Posts: 10
 

Default

thanks Boomer,

it produces the button but with a syntax error and doesn't call correctly as the button doesn't do anything.
Reply With Quote
  #4  
Old 07-24-2004, 04:13 PM
 
brett brett is offline
 

Member
  
Join Date: Jun 2004
Posts: 10
 

Default

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.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 06:48 AM.

   

 
X-Cart forums © 2001-2020