View Single Post
  #1  
Old 01-09-2007, 02:44 PM
 
1day2004 1day2004 is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 115
 

Default 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?
__________________
Version 4.0.8 Live
Reply With Quote