![]() |
Rollover Tags?
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? |
{integral} or {literal}
|
wait im lost do you need to put
the acutall code {integral} in between the javascript coding or what? |
Suggestion
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:
{literal} This is what your customer/home.tpl should look like. Code:
<html> 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 |
All times are GMT -8. The time now is 04:56 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.