| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
|
#1
|
|||||||
|
|||||||
|
I was trying to implement some javascript rollovers in my head.tpl file.
Everytime I do, it blows up the page. I used the {integral} tags around the rollovers themselves and it goes bam! Any ideas? |
|||||||
|
#2
|
|||||||||
|
|||||||||
|
{integral} or {literal}
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. |
|||||||||
|
#3
|
|||||||
|
|||||||
|
wait im lost do you need to put
the acutall code {integral} in between the javascript coding or what? |
|||||||
|
#4
|
|||||||
|
|||||||
|
Create a separate TPL file for the javascript that goes in the head of the document. Name it something like javascript_header.tpl and include it customer/home.tpl. It worked great for me.
Second always use {literal}{/literal} tags around any Javascript functions. The reason is that JavaScript uses {} to declare functions. Smarty will interpret it as smarty and not JS. Which is one of the reasons why it keeps blowing up. This is what your javascript_header.tpl should look like. Code:
This is what your customer/home.tpl should look like. Code:
I do have a working example of JS image rollovers on my current X-Cart store. http://www.angelcycleworld.com/cart/customer NOTE: Don't try to use a JS file. For some reason IE doesn't like a JS file in smarty. I sure hope this helps you guys out. -Jeremy |
|||||||
![]() |
|
| Thread Tools | Search this Thread |
|
|
|
|
|||
|
X-Cart forums © 2001-2020
|
|||