| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
javascript menu | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I want to add this menu into head.tpl
http://www.qualityfoodproducts.com/menu.php The menu is made up of css and javascript. I know how to edit the skin1/css file. But the menu references to another mm_menu.js file. Where can I put this .js file so it is picked up in head.tpl?
__________________
X-Cart Pro 4.1.8 |
|||||||
#2
|
|||||||
|
|||||||
![]() Put it in the skin1 directory and call it without any folder references.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() I still need to do something with this js which was placed on the same menu html page by dreamweaver (and is separate to the external js file). It is the generated code for vertical list roll over menus. Where do I put it? It tried pasting it straight into head.tpl along with the menu table but that makes the whole thing fall over. Hope you can help as this the only thing holding up my cart now.
<script type="text/javascript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <script language="JavaScript"> <!-- function mmLoadMenus() { if (window.mm_menu_0529131332_0) return; window.mm_menu_0529131332_0 = new Menu("root",140,23,"Arial, Helvetica, sans-serif",13,"#FFFFFF","#FFFFFF","#01C0DA","#008BC1", "center","middle",3,0,400,-5,7,true,false,true,0,false,false); mm_menu_0529131332_0.addMenuItem("Frozen Frui ts","location='frozen-fruits.html'"); mm_menu_0529131332_0.addMenuItem("Herbs and&n bsp;Spices","location='herbs-and-spices.html'"); mm_menu_0529131332_0.addMenuItem("IC Fruits", "location='ic-fruits.html'"); mm_menu_0529131332_0.addMenuItem("Specialty D eli","location='specialty-deli.html'"); mm_menu_0529131332_0.hideOnMouseOut=true; mm_menu_0529131332_0.bgColor='#CCCCCC'; mm_menu_0529131332_0.menuBorder=1; mm_menu_0529131332_0.menuLiteBgColor='#FFFFFF'; mm_menu_0529131332_0.menuBorderBgColor='#CCCCCC'; mm_menu_0529131332_0.writeMenus(); } // mmLoadMenus() //--> </script> <script language="JavaScript" src="mm_menu.js"></script> <body onLoad="MM_preloadImages('images/buttons/home.o.jpg','images/buttons/products.o.jpg','images/buttons/about-qfp.o.jpg','images/buttons/contacts.o.jpg','images/buttons/login.o.jpg')"> <script language="JavaScript1.2">mmLoadMenus();</script>
__________________
X-Cart Gold 4.1.7 |
|||||||
#4
|
|||||||
|
|||||||
![]() I goes in the head tag on customer/home.tpl, surrounded by literal tags:
{literal} code here {/literal} You will also need to edit the <body> tag as it shows in your code example above.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() Cheers that worked a treat. I also have a flash object in the same table above the menu but it won't appear:
http://www.qualityfoodproducts.com/shop/home.php I applied the same principles. I think the problem may lie in the code within the table where the flash object sits. Currently I have it in head.tpl as: <tr> <td><script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','800','heigh t','75','title','header','src','flash/header','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','flash/header' ); //end AC code </script><noscript><object classid="clsid ![]() <param name="movie" value="http://www.qualityfoodproducts.com/flash/header.swf" /> <param name="quality" value="high" /> <embed src="http://www.qualityfoodproducts.com/flash/header.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="75"></embed> </object></noscript></td> </tr> Are you able to spot the problem?
__________________
X-Cart Pro 4.1.8 |
|||||||
|
|||
X-Cart forums © 2001-2020
|