Hola
necesito insertar un codigo en java script en una pagina PHP y no me resulta, el java es un dhtlm menu y se ve el menu pero no funcionan los sub menu en la pagina php.
¿como lo inserto? en codigo php paque funcione.
este es el codigo java:(aqui esta en html, pero lo transforme en php, y no funciona es script)
----------------------------------------
<script language="JavaScript">
<!--
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];}
}
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 mmLoadMenus() {
if (window.mm_menu_1127163312_0) return;
window.mm_menu_1127163312_0 = new Menu("root",44,16,"Arial, Helvetica, sans-serif",10,"#000000","#ffffff","#cccccc","#006699", "center","middle",3,0,1000,0,0,true,true,true,0,tr ue,true);
mm_menu_1127163312_0.addMenuItem("Historia");
mm_menu_1127163312_0.addMenuItem("Misión&nb sp;");
mm_menu_1127163312_0.addMenuItem("Visión");
mm_menu_1127163312_0.hideOnMouseOut=true;
mm_menu_1127163312_0.menuBorder=1;
mm_menu_1127163312_0.menuLiteBgColor='#ffffff';
mm_menu_1127163312_0.menuBorderBgColor='#ffffff';
mm_menu_1127163312_0.bgColor='#ffffff';
window.mm_menu_0730203727_0_1 = new Menu("Vivienda",125,16,"Arial, Helvetica, sans-serif",10,"#000000","#ffffff","#cccccc","#006699", "center","middle",3,0,1000,0,0,true,true,true,0,fa lse,true);
mm_menu_0730203727_0_1.addMenuItem("Nichos de agua");
mm_menu_0730203727_0_1.addMenuItem("Nichos de gas");
mm_menu_0730203727_0_1.addMenuItem("Solera ") ;
mm_menu_0730203727_0_1.addMenuItem("Solerilla");
mm_menu_0730203727_0_1.addMenuItem("Cam.inspec.agu a");
mm_menu_0730203727_0_1.addMenuItem("Guarda Ll ave");
mm_menu_0730203727_0_1.addMenuItem("Pastelones");
mm_menu_0730203727_0_1.addMenuItem("Cierre Bu lldog");
mm_menu_0730203727_0_1.hideOnMouseOut=true;
mm_menu_0730203727_0_1.menuBorder=1;
mm_menu_0730203727_0_1.menuLiteBgColor='#ffffff';
mm_menu_0730203727_0_1.menuBorderBgColor='#ffffff' ;
mm_menu_0730203727_0_1.bgColor='#ffffff';
window.mm_menu_0730203727_0_2 = new Menu("Carretera",125,16,"Arial, Helvetica, sans-serif",10,"#000000","#ffffff","#cccccc","#006699", "center","middle",3,0,1000,0,0,true,true,true,0,fa lse,true);
mm_menu_0730203727_0_2.addMenuItem("Barras ac ústicas");
mm_menu_0730203727_0_2.addMenuItem("Cámara& nbsp;de telepeaje");
mm_menu_0730203727_0_2.hideOnMouseOut=true;
mm_menu_0730203727_0_2.menuBorder=1;
mm_menu_0730203727_0_2.menuLiteBgColor='#ffffff';
mm_menu_0730203727_0_2.menuBorderBgColor='#ffffff' ;
mm_menu_0730203727_0_2.bgColor='#ffffff';
window.mm_menu_0730203727_0_3 = new Menu("Telecomunicaciones",125,16,"Arial, Helvetica, sans-serif",10,"#000000","#ffffff","#cccccc","#006699", "center","middle",3,0,1000,0,0,true,true,true,0,fa lse,true);
mm_menu_0730203727_0_3.addMenuItem("Cámara" );
mm_menu_0730203727_0_3.addMenuItem("Postes");
mm_menu_0730203727_0_3.hideOnMouseOut=true;
mm_menu_0730203727_0_3.menuBorder=1;
mm_menu_0730203727_0_3.menuLiteBgColor='#ffffff';
mm_menu_0730203727_0_3.menuBorderBgColor='#ffffff' ;
mm_menu_0730203727_0_3.bgColor='#ffffff';
window.mm_menu_0730203727_0 = new Menu("root",125,16,"Arial, Helvetica, sans-serif",10,"#000000","#ffffff","#cccccc","#006699", "center","middle",3,0,1000,0,0,true,true,true,0,fa lse,true);
mm_menu_0730203727_0.addMenuItem(mm_menu_073020372 7_0_1);
mm_menu_0730203727_0.addMenuItem(mm_menu_073020372 7_0_2);
mm_menu_0730203727_0.addMenuItem(mm_menu_073020372 7_0_3);
mm_menu_0730203727_0.hideOnMouseOut=true;
mm_menu_0730203727_0.childMenuIcon="arrows.gif";
mm_menu_0730203727_0.menuBorder=1;
mm_menu_0730203727_0.menuLiteBgColor='#ffffff';
mm_menu_0730203727_0.menuBorderBgColor='#ffffff';
mm_menu_0730203727_0.bgColor='#ffffff';
window.mm_menu_1127162557_1 = new Menu("root",52,16,"Arial, Helvetica, sans-serif",10,"#000000","#ffffff","#cccccc","#006699", "center","middle",3,0,1000,0,0,true,true,true,0,tr ue,true);
mm_menu_1127162557_1.addMenuItem("Montajes");
mm_menu_1127162557_1.hideOnMouseOut=true;
mm_menu_1127162557_1.menuBorder=1;
mm_menu_1127162557_1.menuLiteBgColor='#ffffff';
mm_menu_1127162557_1.menuBorderBgColor='#ffffff';
mm_menu_1127162557_1.bgColor='#ffffff';
window.mm_menu_1127162952_2 = new Menu("root",54,16,"Arial, Helvetica, sans-serif",10,"#000000","#ffffff","#cccccc","#006699", "center","middle",3,0,1000,0,0,true,true,true,0,tr ue,true);
mm_menu_1127162952_2.addMenuItem("Ventas");
mm_menu_1127162952_2.addMenuItem("Consultas");
mm_menu_1127162952_2.hideOnMouseOut=true;
mm_menu_1127162952_2.menuBorder=1;
mm_menu_1127162952_2.menuLiteBgColor='#ffffff';
mm_menu_1127162952_2.menuBorderBgColor='#ffffff';
mm_menu_1127162952_2.bgColor='#ffffff';
mm_menu_1127162952_2.writeMenus();
} // mmLoadMenus()
//-->
</script>
<script language="JavaScript1.2" src="mm_menu.js"></script>
-------------------------------
salu2
zsamer