| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
#1
|
|||||||||
|
|||||||||
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.
__________________
xcart 5.1.2 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Image Swap
Anyone? I have a really sweet orange button I want to use with my really sweet blue button!!!
__________________
xcart 5.1.2 |
|||||||||
#3
|
|||||||
|
|||||||
Re: Image Swap
Just use onmouseover/onmouseout to call different classes in CSS
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#4
|
|||||||||
|
|||||||||
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?
__________________
xcart 5.1.2 |
|||||||||
#5
|
|||||||||
|
|||||||||
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>
__________________
xcart 5.1.2 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|