ljesh Posted May 14, 2009 Share Posted May 14, 2009 I am trying to do basic header/footer integration of whmcs into my website. Everything went smoothly but 2 things. 1. I am using dropdown javascript in my menu. Although it works on my website, it doesn't work on header.tpl. I tried calling it like a file <script type="text/javascript" src="dropdown.js"></script> and pasting it in the header.tpl, right above </head>. Second method: pasting the complete (content) script right above </head>. First method doesn't do anything, everything is there, but no dropdown on 2 places where there should be. The second one stops the template from working. this is the content of my dropdown.js //<![CDATA[ var listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none'); //listMenu.showDelay = 0; //listMenu.switchDelay = 125; //listMenu.hideDelay = 500; //listMenu.cssLitClass = 'highlighted'; //listMenu.showOnClick = 0; //listMenu.hideOnClick = true; listMenu.animInSpeed = 0.50; listMenu.animOutSpeed = 0.10; listMenu.animations[listMenu.animations.length] = FSMenu.animFade; listMenu.animations[listMenu.animations.length] = FSMenu.animSwipeDown; //listMenu.animations[listMenu.animations.length] = FSMenu.animClipDown; var arrow = null; if (document.createElement && document.documentElement) { arrow = document.createElement('span'); arrow.appendChild(document.createTextNode('>')); //arrow = document.createElement('img'); //arrow.src = 'arrow.gif'; //arrow.style.borderWidth = '0'; arrow.className = 'subind'; } addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", arrow)')); which works on my website perfect. 2. When viewing the website in https the menu goes in 2 rows, font changes... what may be causing this and how to fix it? Any help is highly appreciated. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted May 14, 2009 Share Posted May 14, 2009 When using JavaScript in the tpl files you must wrap them in {literal}{/literal} tags. 0 Quote Link to comment Share on other sites More sharing options...
ljesh Posted May 14, 2009 Author Share Posted May 14, 2009 Now right above </head> in header.tpl I added {literal}<script type="text/javascript" src="dropdown.js"></script>{/literal} but it still doesn't work Am I doing something wrong? 0 Quote Link to comment Share on other sites More sharing options...
ljesh Posted May 14, 2009 Author Share Posted May 14, 2009 Ok, we fixed the menu problem. Now the only problem remained is: 2. When viewing the website in https the menu goes in 2 rows, font changes... what may be causing this and how to fix it? Please advise. 0 Quote Link to comment Share on other sites More sharing options...
ljesh Posted May 15, 2009 Author Share Posted May 15, 2009 Finally solved my problem nr. 2. Been fighting with it for 2 days and I didn't even notice there is style.css in orderform template too LOL 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.