If/Then Statment in Body Tag
I currently have the following in my body tag:
Code:
body onLoad="MM_preloadImages('../images/navigation1.gif','../images/navigation2.gif')" I have Google Analytics and want to add this into the body tag: Code:
{if $body_onload ne '' or $smarty.get.mode eq "order_message"} onload="{if $smarty.get.mode eq "order_message"}javascript:__utmSetTrans();{/if}{$body_onload}"{/if} If I simply add the 2 codes together like this: Code:
body onLoad="MM_preloadImages('../images/navigation1.gif','../images/navigation2.gif')" ]{if $body_onload ne '' or $smarty.get.mode eq "order_message"} onload="{if $smarty.get.mode eq "order_message"}javascript:__utmSetTrans();{/if}{$body_onload}"{/if} I will have 2 onload events on the order_message page. What is the proper method of merging these together? |
Re: If/Then Statment in Body Tag
Try this:
Code:
onload="MM_preloadImages('../images/navigation1.gif','../images/navigation2.gif');{if $smarty.get.mode eq "order_message"} javascript:__utmSetTrans();{/if}{if $body_onload ne ""} {$body_onload}{/if}" |
Re: If/Then Statment in Body Tag
Perfect Jon, worked great.
Thanks. |
All times are GMT -8. The time now is 04:02 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.