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)
-   -   Image Swap (https://forum.x-cart.com/showthread.php?t=33975)

ARW VISIONS 09-16-2007 08:33 PM

Image Swap
 
I would like to do an image swap on my products page for my buy now button. Anyone know how to do this. I keep getting a php tag error when I put javaScript in the home.tpl file. It also slows the page load way down. I tried calling it from an external file but it was still slooooow and the swap did not work.

ARW VISIONS 09-17-2007 09:13 AM

Re: Image Swap
 
Anyone? I have a really sweet orange button I want to use with my really sweet blue button!!! :(

balinor 09-17-2007 10:11 AM

Re: Image Swap
 
Just use onmouseover/onmouseout to call different classes in CSS

ARW VISIONS 09-17-2007 10:50 AM

Re: Image Swap
 
man...

I added this to the product.tpl

<td align="center" width="200px" height="37px" onmouseover="this.class.name='atcButton2'" onmouseout="this.class.name='atcButton1'"><A href="javascript: document.orderform.submit();">Add to Cart</a></td>

and this to my css file

td.atcButton1{
background:#ffffff url(images/atcButton.gif) no-Repeat;

}
td.atcButton2{
background:#ffffff url(images/atcButton2.gif) no-Repeat;
}

I even tried it with an internal style and nothing... am I calling it right?

ARW VISIONS 09-17-2007 12:15 PM

Re: Image Swap
 
ended up using this....

<tr>
<td align="center"><a href="javascript: document.orderform.submit();"
onmouseover="document.atcButton.src='skin1/images/atcButton2.gif';"
onmouseout="document.atcButton.src='skin1/images/atcButton.gif';">
<img name="atcButton" src="skin1/images/atcButton.gif" width="200px" height="37px" />
</a>
</td>
</tr>


All times are GMT -8. The time now is 01:31 AM.

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