ni DIV ni LAYER

26/09/2003 - 00:03 por Emerson | Informe spam
generé un código javascript, que corre en IE todas las versiones (por lo
menos 4.0 <) y no corre en NETSCAPE 7.1, si en las anteriores al 7.0.

no me acepta ni el DIV ni LAYER

qué piensan???

Emerson

Preguntas similare

Leer las respuestas

#6 Sashka
30/09/2003 - 16:14 | Informe spam
Para las versiones posteriores usa DOM...

var hh =document.getElementById("CapaExt")
hh.innerHTML=texto

Sashka

"Emerson" <emerson%leshalles.cl> escribió en el mensaje
news:
gracias,

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>desde un select a texto</TITLE>

<SCRIPT language=javascript>
<!--
var FormularioHijo;
function FnCambiaDireccion(formulario, Obj) {
dir = Obj.options[Obj.selectedIndex].value;
texto = eval('document.' + formulario.name + '.hid_' + dir +


'.value');
if( isNav ) {
texto = "<font face=Verdana, Arial size=-2>" + texto + "</font>";
document.CapaExt.document.CapaInt.document.write(texto);
document.CapaExt.document.CapaInt.document.close();
}
else {
CapaExt.innerHTML=texto;
}
}

function FnValoresPorDefecto() {
FnCambiaDireccion(document.frmDireccion,document.frmDireccion.billto_rn);
}

var isNav, isIE;
if (parseInt(navigator.appVersion) >= 4){
if (navigator.appName == "Netscape"){
isNav = true;
}
else if (navigator.appName == "Microsoft Internet Explorer" &&
navigator.appVersion.indexOf("Mac") == -1){
isIE = true;
}
}

// -->
</SCRIPT>

<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY leftMargin=0 topMargin=0
onload="window.defaultStatus='Direccion';FnValoresPorDefecto();return


true"
marginheight="0" marginwidth="0">


<FORM name=frmDireccion method=post>
<INPUT type=hidden value="<br>-" name=hid_28762142>
<INPUT type=hidden value="<br>-" name=hid_25652147>
<INPUT type=hidden value="<br>-" name=hid_28760207>
<INPUT type=hidden value="<br>-" name=hid_3598394>
<INPUT type=hidden value="Lago Maullin - Chile" name=hid_28762098>
<INPUT type=hidden value="fresia - LA FLORIDA" name=hid_25648189>
<INPUT type=hidden value="teatinos - SANTIAGO " name=hid_2671222>
<INPUT type=hidden value="petrohue - TALCAHUANO " name=hid_3196720>
<br>
<SELECT onchange="FnCambiaDireccion(this.form, this);"
name=billto_rn>
<OPTION value(762098 selected>Casa Thno
<OPTION value%648189>Condominio
<OPTION value&71222>Emerson
<OPTION value196720>Miguel</OPTION>
</SELECT>
</FONT>
<FONT face=Verdana, color=#666600 size=-2 Arial>
<SCRIPT language=JavaScript>
<!--
if( isNav ) {
document.write('<ILAYER ID=CapaExt WIDTH!5 HEIGHT`> ');
document.write(" <LAYER ID=CapaInt WIDTH!5 HEIGHT`>");
document.write(" </LAYER> ");
document.write("</ILAYER> ");
}
else {
document.write("<DIV ID=CapaExt WIDTH!5 HEIGHT`>&nbsp; ");
document.write("</DIV> ");
}
//-->
</SCRIPT>
</FONT>

</FORM>

<BR>
<META http-equiv=expires content=-1></BODY></HTML>


Emerson

"Raul" wrote in message
news:hEUdb.172401$
> Publica el código a ver que es lo que está fallando.
> O consulta la consola de JavaScript para ver qué error te está dando.
>
>
>
> Emerson wrote:
> > lo extraño, es que en las versiones anteriores a Netscape SI funciona,
pero
> > en las últimas no corre... he ahí la pregunta.
> >
> > qué piensas...?
> >
> >
> > "Miguel Gonzalez" wrote in message
> > news:#
> >
> >>El tag "<layer>" no está incluido en las especificaciones vigentes del
> >
> > W3C,
> >
> >>por lo tanto las últimas versiones de los navegadores se limitan a
> >
> > ignorarlo
> >
> >>(caso del Netscape 7.0). El tag "<div>" si que está incluido, pero


como
> >
> > sus
> >
> >>características son relativamente recientes las versiones más antiguas
de
> >>los navegadores no lo interpretan en todas sus capacidades.
> >>
> >>Para ver las especificaciones:
> >>http://www.w3c.org
> >>
> >>
> >>Un consejo, si usas DHTML (HTML dinámico) olvídate de la


compatibilidad
de
> >>los "efectos"
> >>con los navegadores antiguos, mejor límitate a que en esas versiones


no
> >>muestre errores de código (un simple filtro "if" que testee la versión
del
> >>navegador antes de ejectuar el código debería bastar)
> >>
> >>Un saludo!
> >>Miguel
> >>
> >>"Emerson" <emerson%leshalles.cl> escribió en el mensaje
> >>news:
> >>
> >>>generé un código javascript, que corre en IE todas las versiones (por
lo
> >>>menos 4.0 <) y no corre en NETSCAPE 7.1, si en las anteriores al 7.0.
> >>>
> >>>no me acepta ni el DIV ni LAYER
> >>>
> >>>qué piensan???
> >>>
> >>>Emerson
> >>>
> >>>
> >>
> >>
> >>
> >
> >
>


Respuesta Responder a este mensaje
#7 Emerson
30/09/2003 - 21:38 | Informe spam
gracias,

EG

"Sashka" wrote in message
news:#
Para las versiones posteriores usa DOM...

var hh =document.getElementById("CapaExt")
hh.innerHTML=texto

Sashka

"Emerson" <emerson%leshalles.cl> escribió en el mensaje
news:
> gracias,
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD><TITLE>desde un select a texto</TITLE>
>
> <SCRIPT language=javascript>
> <!--
> var FormularioHijo;
> function FnCambiaDireccion(formulario, Obj) {
> dir = Obj.options[Obj.selectedIndex].value;
> texto = eval('document.' + formulario.name + '.hid_' + dir +
'.value');
> if( isNav ) {
> texto = "<font face=Verdana, Arial size=-2>" + texto + "</font>";
> document.CapaExt.document.CapaInt.document.write(texto);
> document.CapaExt.document.CapaInt.document.close();
> }
> else {
> CapaExt.innerHTML=texto;
> }
> }
>
> function FnValoresPorDefecto() {
>


FnCambiaDireccion(document.frmDireccion,document.frmDireccion.billto_rn);
> }
>
> var isNav, isIE;
> if (parseInt(navigator.appVersion) >= 4){
> if (navigator.appName == "Netscape"){
> isNav = true;
> }
> else if (navigator.appName == "Microsoft Internet Explorer" &&
> navigator.appVersion.indexOf("Mac") == -1){
> isIE = true;
> }
> }
>
> // -->
> </SCRIPT>
>
> <META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
> <BODY leftMargin=0 topMargin=0
> onload="window.defaultStatus='Direccion';FnValoresPorDefecto();return
true"
> marginheight="0" marginwidth="0">
>
>
> <FORM name=frmDireccion method=post>
> <INPUT type=hidden value="<br>-" name=hid_28762142>
> <INPUT type=hidden value="<br>-" name=hid_25652147>
> <INPUT type=hidden value="<br>-" name=hid_28760207>
> <INPUT type=hidden value="<br>-" name=hid_3598394>
> <INPUT type=hidden value="Lago Maullin - Chile" name=hid_28762098>
> <INPUT type=hidden value="fresia - LA FLORIDA" name=hid_25648189>
> <INPUT type=hidden value="teatinos - SANTIAGO " name=hid_2671222>
> <INPUT type=hidden value="petrohue - TALCAHUANO " name=hid_3196720>
> <br>
> <SELECT onchange="FnCambiaDireccion(this.form, this);"
> name=billto_rn>
> <OPTION value(762098 selected>Casa Thno
> <OPTION value%648189>Condominio
> <OPTION value&71222>Emerson
> <OPTION value196720>Miguel</OPTION>
> </SELECT>
> </FONT>
> <FONT face=Verdana, color=#666600 size=-2 Arial>
> <SCRIPT language=JavaScript>
> <!--
> if( isNav ) {
> document.write('<ILAYER ID=CapaExt WIDTH!5 HEIGHT`> ');
> document.write(" <LAYER ID=CapaInt WIDTH!5 HEIGHT`>");
> document.write(" </LAYER> ");
> document.write("</ILAYER> ");
> }
> else {
> document.write("<DIV ID=CapaExt WIDTH!5 HEIGHT`>&nbsp; ");
> document.write("</DIV> ");
> }
> //-->
> </SCRIPT>
> </FONT>
>
> </FORM>
>
> <BR>
> <META http-equiv=expires content=-1></BODY></HTML>
>
>
> Emerson
>
> "Raul" wrote in message
> news:hEUdb.172401$
> > Publica el código a ver que es lo que está fallando.
> > O consulta la consola de JavaScript para ver qué error te está dando.
> >
> >
> >
> > Emerson wrote:
> > > lo extraño, es que en las versiones anteriores a Netscape SI


funciona,
> pero
> > > en las últimas no corre... he ahí la pregunta.
> > >
> > > qué piensas...?
> > >
> > >
> > > "Miguel Gonzalez" wrote in message
> > > news:#
> > >
> > >>El tag "<layer>" no está incluido en las especificaciones vigentes


del
> > >
> > > W3C,
> > >
> > >>por lo tanto las últimas versiones de los navegadores se limitan a
> > >
> > > ignorarlo
> > >
> > >>(caso del Netscape 7.0). El tag "<div>" si que está incluido, pero
como
> > >
> > > sus
> > >
> > >>características son relativamente recientes las versiones más


antiguas
> de
> > >>los navegadores no lo interpretan en todas sus capacidades.
> > >>
> > >>Para ver las especificaciones:
> > >>http://www.w3c.org
> > >>
> > >>
> > >>Un consejo, si usas DHTML (HTML dinámico) olvídate de la
compatibilidad
> de
> > >>los "efectos"
> > >>con los navegadores antiguos, mejor límitate a que en esas versiones
no
> > >>muestre errores de código (un simple filtro "if" que testee la


versión
> del
> > >>navegador antes de ejectuar el código debería bastar)
> > >>
> > >>Un saludo!
> > >>Miguel
> > >>
> > >>"Emerson" <emerson%leshalles.cl> escribió en el mensaje
> > >>news:
> > >>
> > >>>generé un código javascript, que corre en IE todas las versiones


(por
> lo
> > >>>menos 4.0 <) y no corre en NETSCAPE 7.1, si en las anteriores al


7.0.
> > >>>
> > >>>no me acepta ni el DIV ni LAYER
> > >>>
> > >>>qué piensan???
> > >>>
> > >>>Emerson
> > >>>
> > >>>
> > >>
> > >>
> > >>
> > >
> > >
> >
>
>


email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una pregunta AnteriorRespuesta Tengo una respuesta
Search Busqueda sugerida