Compañeros tengo una página (pagina.htm ) y un archivo (funciones.js ) en dicho archivo desde luego tengo mis funciones JavaScript.
Pero resulta, que en IE, todo funciona a la perfeción pero en NS 7.0, no mas no hace nada
en el body de mi página tengo esto:
Cita:
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<script language="JavaScript1.2" src="filefunc.js"></script>
<script language="JavaScript" src="mm_menu.js"></script>
<link href="/html/estilos.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" background="./images/pagina_base/back_cafeclaro.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="initiate(1);MM_preloadImages('./images/pagina_base/menues/boletinoficial_on.gif','./images/pagina_base/menues/servicios_on.gif','./images/pagina_base/menues/formacion_on.gif','./images/pagina_base/menues/proyecto_on.gif','./images/pagina_base/kinder2_on.gif','./images/pagina_base/primaria2_on.gif','./images/pagina_base/secundaria2_on.gif')">
<script language="JavaScript1.2">mmLoadMenus();</script>
<!-- **** BEGIN LAYERS -->
<div id="scrollerbg" style="position:absolute;top:-1000px"></div>
<div id="scrollertext" style="position:absolute;top:-1000px"></div>
<DIV id="deletethisdiv" style="position:absolute;top:132;left:418px;width: 360px; height:20px"></DIV>
<div id="primaria" style="position:absolute; left:198px; top:420px; width:345px; z-index:1; height: 72px; background-color: D8C8A0; layer-background-color: D8C8A0; border: 0px none #000000;"></div>
<div id="secundaria" style="position:absolute; left:198px; top:420px; width:345px; z-index:1; height: 72px; background-color: D8C8A0; layer-background-color: D8C8A0; border: 0px none #000000;"></div>
<div id="kinder" style="position:absolute; left:198px; top:420px; width:345px; z-index:3; height: 72px; background-color: D8C8A0; layer-background-color: D8C8A0; border: 0px none #000000;"></div>
etc, etc...function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<script language="JavaScript1.2" src="filefunc.js"></script>
<script language="JavaScript" src="mm_menu.js"></script>
<link href="/html/estilos.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" background="./images/pagina_base/back_cafeclaro.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="initiate(1);MM_preloadImages('./images/pagina_base/menues/boletinoficial_on.gif','./images/pagina_base/menues/servicios_on.gif','./images/pagina_base/menues/formacion_on.gif','./images/pagina_base/menues/proyecto_on.gif','./images/pagina_base/kinder2_on.gif','./images/pagina_base/primaria2_on.gif','./images/pagina_base/secundaria2_on.gif')">
<script language="JavaScript1.2">mmLoadMenus();</script>
<!-- **** BEGIN LAYERS -->
<div id="scrollerbg" style="position:absolute;top:-1000px"></div>
<div id="scrollertext" style="position:absolute;top:-1000px"></div>
<DIV id="deletethisdiv" style="position:absolute;top:132;left:418px;width: 360px; height:20px"></DIV>
<div id="primaria" style="position:absolute; left:198px; top:420px; width:345px; z-index:1; height: 72px; background-color: D8C8A0; layer-background-color: D8C8A0; border: 0px none #000000;"></div>
<div id="secundaria" style="position:absolute; left:198px; top:420px; width:345px; z-index:1; height: 72px; background-color: D8C8A0; layer-background-color: D8C8A0; border: 0px none #000000;"></div>
<div id="kinder" style="position:absolute; left:198px; top:420px; width:345px; z-index:3; height: 72px; background-color: D8C8A0; layer-background-color: D8C8A0; border: 0px none #000000;"></div>
en en mi archivo filefunc.js, tengo esto:
Cita:
en IE funciona bien pero en NS no hace nada.function initiate(pval){
if (pval==1){
movediv(1)
}
}
function movediv(pval){
var ovar= new Array()
var oref= new Array()
var oima= new Array()
if (pval==1) {
ovar[0]="Maternal y Kinder"
ovar[1]="Servicios en Kinder"
ovar[2]=""
ovar[3]=""
oref[0]=""
oref[1]="href='/html/servkinder.htm'>"
oref[2]=""
oref[3]=""
oima[0]=""
oima[1]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[2]=""
oima[3]=""
}
if (pval==2) {
ovar[0]="Primaria"
ovar[1]="Servicios en Primaria"
ovar[2]=""
ovar[3]=""
oref[0]=""
oref[1]="href='/html/servprimaria.htm'>"
oref[2]=""
oref[3]=""
oima[0]=""
oima[1]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[2]=""
oima[3]=""
}
if (pval==3) {
ovar[0]="Secundaria y Bachillerato"
ovar[1]="Servicios en Secundaria"
ovar[2]="Servicios en preparatoria"
ovar[3]=""
oref[0]=""
oref[1]="href='/html/servsecundaria.htm'>"
oref[2]="href='/html/servbachillerato.htm'>"
oref[3]=""
oima[0]=""
oima[1]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[2]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[3]=""
}
contenttext="<table width='350' border='0' cellpadding='0' cellspacing='0' bgcolor='#000000'>"
+" <tr>"
+" <td><img src='/images/pagina_base/pixel.gif' width='350' height='1'></td>"
+" </tr>"
+" </table>"
+" <table width='344' height='70' border='0' align='center' cellpadding='0' cellspacing='0'>"
+" <tr> "
+" <td width='11' height='70' rowspan='5'> </td>"
+" <td width='339'><img src='/images/pagina_base/pixel.gif' width='2' height='5'></td>"
+" </tr>"
+" <tr> "
+" <td height='16' valign='top' nowrap> "
+" <p><strong><font color='660000' size='2' face='Verdana, Arial, Helvetica, sans-serif'> "
+ ovar[0]+"</font></strong></p></td>"
+" </tr>"
+" <tr> "
+" <td height='16' nowrap>"
+"<p><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>"+oima[1]
+" </strong><font color='#000000'><a "+oref[1]+ovar[1]+"</a></font></font></p></td>"
+" </tr>"
+" <tr> "
+" <td height='16' nowrap>"
+"<p><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>"+oima[2]
+" </strong> <font color='#000000'><a "+oref[2]+ovar[2]+"</a> "
+" </font></font></p></td>"
+" </tr>"
+" <tr> "
+" <td height='16' nowrap>"
+"<p><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>"+oima[3]
+" </strong><font color='#000000'><a "+oref[3]+ovar[3]+"</a> "
+" </font></font></p></td>"
+" </tr>"
+" <tr> "
+" <td><img src='/images/pagina_base/pixel.gif' width='2' height='5'></td>"
+" </tr>"
+" </table>"
+" <table width='350' border='0' cellpadding='0' cellspacing='0' bgcolor='#000000'>"
+" <tr>"
+" <td><img src='/images/pagina_base/pixel.gif' width='350' height='1'></td>"
+" </tr>"
+" </table>"
if (pval==1) {kinder.innerHTML=contenttext}
if (pval==2) {primaria.innerHTML=contenttext}
if (pval==3) {secundaria.innerHTML=contenttext}
if (document.layers) {
if (pval==1) {
kinder.document.write(contenttext)
document.kinder.document.close()
}
if (pval==2) {
document.primaria.document.write(contenttext)
document.primaria.document.close()
}
if (pval==3) {
document.secundaria.document.write(contenttext)
document.secundaria.document.close()
}
}
}
if (pval==1){
movediv(1)
}
}
function movediv(pval){
var ovar= new Array()
var oref= new Array()
var oima= new Array()
if (pval==1) {
ovar[0]="Maternal y Kinder"
ovar[1]="Servicios en Kinder"
ovar[2]=""
ovar[3]=""
oref[0]=""
oref[1]="href='/html/servkinder.htm'>"
oref[2]=""
oref[3]=""
oima[0]=""
oima[1]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[2]=""
oima[3]=""
}
if (pval==2) {
ovar[0]="Primaria"
ovar[1]="Servicios en Primaria"
ovar[2]=""
ovar[3]=""
oref[0]=""
oref[1]="href='/html/servprimaria.htm'>"
oref[2]=""
oref[3]=""
oima[0]=""
oima[1]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[2]=""
oima[3]=""
}
if (pval==3) {
ovar[0]="Secundaria y Bachillerato"
ovar[1]="Servicios en Secundaria"
ovar[2]="Servicios en preparatoria"
ovar[3]=""
oref[0]=""
oref[1]="href='/html/servsecundaria.htm'>"
oref[2]="href='/html/servbachillerato.htm'>"
oref[3]=""
oima[0]=""
oima[1]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[2]="<img src='/images/pagina_base/bullet.gif' width='8' height='8'> "
oima[3]=""
}
contenttext="<table width='350' border='0' cellpadding='0' cellspacing='0' bgcolor='#000000'>"
+" <tr>"
+" <td><img src='/images/pagina_base/pixel.gif' width='350' height='1'></td>"
+" </tr>"
+" </table>"
+" <table width='344' height='70' border='0' align='center' cellpadding='0' cellspacing='0'>"
+" <tr> "
+" <td width='11' height='70' rowspan='5'> </td>"
+" <td width='339'><img src='/images/pagina_base/pixel.gif' width='2' height='5'></td>"
+" </tr>"
+" <tr> "
+" <td height='16' valign='top' nowrap> "
+" <p><strong><font color='660000' size='2' face='Verdana, Arial, Helvetica, sans-serif'> "
+ ovar[0]+"</font></strong></p></td>"
+" </tr>"
+" <tr> "
+" <td height='16' nowrap>"
+"<p><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>"+oima[1]
+" </strong><font color='#000000'><a "+oref[1]+ovar[1]+"</a></font></font></p></td>"
+" </tr>"
+" <tr> "
+" <td height='16' nowrap>"
+"<p><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>"+oima[2]
+" </strong> <font color='#000000'><a "+oref[2]+ovar[2]+"</a> "
+" </font></font></p></td>"
+" </tr>"
+" <tr> "
+" <td height='16' nowrap>"
+"<p><font size='2' face='Verdana, Arial, Helvetica, sans-serif'><strong>"+oima[3]
+" </strong><font color='#000000'><a "+oref[3]+ovar[3]+"</a> "
+" </font></font></p></td>"
+" </tr>"
+" <tr> "
+" <td><img src='/images/pagina_base/pixel.gif' width='2' height='5'></td>"
+" </tr>"
+" </table>"
+" <table width='350' border='0' cellpadding='0' cellspacing='0' bgcolor='#000000'>"
+" <tr>"
+" <td><img src='/images/pagina_base/pixel.gif' width='350' height='1'></td>"
+" </tr>"
+" </table>"
if (pval==1) {kinder.innerHTML=contenttext}
if (pval==2) {primaria.innerHTML=contenttext}
if (pval==3) {secundaria.innerHTML=contenttext}
if (document.layers) {
if (pval==1) {
kinder.document.write(contenttext)
document.kinder.document.close()
}
if (pval==2) {
document.primaria.document.write(contenttext)
document.primaria.document.close()
}
if (pval==3) {
document.secundaria.document.write(contenttext)
document.secundaria.document.close()
}
}
}
No me evalua if (document.layers ) ni if (document.all ), es decir, no entra a esas condiciones...
mucho les agradeceré me hechen la mano en esto que ya llevo varios dias sin que se pueda resolver...
saludos y desde ya muchas gracias...
DevCH