Foros del Web » Programando para Internet » Javascript »

Comportamientos extraños dentro de FieldSet con Explorer 6

Estas en el tema de Comportamientos extraños dentro de FieldSet con Explorer 6 en el foro de Javascript en Foros del Web. Muy buenas, aquí pongo el código para que le echeis un vistazo... Mil gracias de Antemano... Estoy recorriendo todos los elementos del documento y con ...
  #1 (permalink)  
Antiguo 27/08/2010, 04:02
 
Fecha de Ingreso: marzo-2004
Mensajes: 35
Antigüedad: 20 años, 1 mes
Puntos: 0
Comportamientos extraños dentro de FieldSet con Explorer 6

Muy buenas, aquí pongo el código para que le echeis un vistazo... Mil gracias de Antemano...
Estoy recorriendo todos los elementos del documento y con fieldset no me reconoce el tipo en el Explorer... Me sale "undefined" ...
Despues cuando cambio su atributo disabled a true se me ponen disabled todos los elementos dentro del Fieldset...
Lo más curioso de todo es que intento acceder a la propiedad disabled de un botón dentro del FieldSet y no me lo cambia... Sin embargo en un alert de su propiedad me sale que su propiedad está en disabled =false, cuando aparentemente saled disabled = true ...

Aquí os pongo mi código, a ver si alguien me puede echar un cable...
Mil gracias de antemano...

<html>
<head>
<title>Consultas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" TYPE="TEXT/CSS" HREF="/esp/ecom/ebo/css/ebo1.css">
<SCRIPT language="JavaScript" src="/esp/ecom/ebo/src/fgets.js"></SCRIPT>
</head>
<script language="JavaScript">




function modoEncuesta()
{




for (a = 0; obj = document.DatosEncuestas.elements[a]; a++) //Recorre todos los elementos del formulario, campos ocultos , text, radios...
{
if(obj.type !='button' && obj.type!='undefined')
{

alert("tipo--->"+obj.type+" valor--->" + obj.value );
obj.disabled=true;
//alert(obj.type);
}


}
var objeto = document.getElementById('simular');
alert(objeto.disabled);
//document.getElementById('simular').setAttribute("d isabled","")
objeto.disabled=false;
alert(objeto.disabled);




}

</script>
</head>
<body class="" onload="modoEncuesta()">
<form name="DatosEncuestas" method="POST" action="/Bpeebo/">
<CENTER>

<table width="96%" border="0" cellspacing="0" cellpadding="1" bgcolor="">
<tr>
<td colspan="5">&nbsp;</td>
</tr>

<tr>
<td>



<table bgcolor="#F3F4FF" width="100%" border="0" cellspacing="1" cellpadding="0">

<tr>
<td colspan="6"></a></td>
</tr>

<tr>
<td width="0%" ></td>
<td width="1%" class="CeldaB">&nbsp;</td>
<td width="0%" class="CeldaB">&nbsp;</td>
<td width="30%"><input type="text" name="NombreEncuesta" id="NombreEncuesta" size="60" maxlength="50" Value="NOMBRE DE ENCUESTA" disabled="true"></td>
<td width="69%"></td>
</tr>
<tr>
<td width="0%" ></td>
<td width="1%" class="CeldaB">&nbsp;</td>
<td width="0%" class="CeldaB">&nbsp;</td>

<td width="30%"><textarea name="TextoPreguntasBloque" id="TextoPreguntasBloque" class="input01" rows="5" cols="60" disabled="true"> algo</textarea></td>
<td width="69%"></td>
</tr>


</table>


<fieldset class="CeldaBn"><legend id="legendPreguntas">Pregunta 1</legend>
<table bgcolor="#F3F4FF" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="0%" class="CeldaB">&nbsp;</td>
<td width="10%" class="CeldaB">Enunciado:</td>
<td width="70%"><input type="text" name="dios" id="Enunciado" size="100" maxlength="400" onmouseover="alert(this.type);" disabled="disabled"></td>
<td width="20%"></td>
</tr>
</table>
<table>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table bgcolor="#F3F4FF" width="50%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="20%" valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="0%" ></td>
<td width="1%" class="CeldaB">&nbsp;</td>
<td width="30%" class="CeldaB" nowrap>Número de Respuestas</td>
<td width="69%" class="CeldaB" align="left"><select id="NumRespuestas" name="NumRespuestas" onchange="pintarFilas(this.value);">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5" selected>5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</td>

</tr>
</table>
<table width="100%">

<tr align="center">
<td>&nbsp;</td>
</tr>
<tr align="center">
<td>
<div id="botonId"><input type="button" id="simular" value="Simular" onclick="simular();"></div>
</td>
</tr>
<tr align="center">
<td>
<input type="button" id="Simular2" value="Simular2" onclick="simular();">
</td>
</tr>

</table>

</td>

<td width="33%" valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>

<td width="1%" class="CeldaB">&nbsp;</td>
<td width="20%" class="CeldaB" valign="top" align="left" nowrap>Selección</td>
<td width="79%" class="CeldaB" nowrap>
<input type="radio" name="TipoA" id="TipoA_0" value="0" onclick="disableRadioUnica(this);deschekeaTodo();" >Respuesta única<br>
<input type="radio" name="TipoA" id="TipoA_1" value="1" onclick="disableRadioMultiple(this);">Selección Múltiple
</td>

</tr>
</table>
</td>
<td width="33%" valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>

<td width="1%" class="CeldaB">&nbsp;</td>
<td width="20%" class="CeldaB" valign="top" align="left">Tipo</td>
<td width="79%" class="CeldaB" nowrap>
<input type="radio" name="TipoB" id="TipoB_0" value="0">Radio button Vertical<br>
<input type="radio" name="TipoB" id="TipoB_1" value="1">Radio button horizontal<br>
<input type="radio" name="TipoB" id="TipoB_2" value="2">Check box Vertical<br>
<input type="radio" name="TipoB" id="TipoB_3" value="3">Check box horizontal<br>
<input type="radio" name="TipoB" id="TipoB_4" value="4">Combo box<br>
</td>

</tr>
</table>
</td>
</tr>
</table>
<fieldset class="" ><legend>Respuestas</legend>
<table bgcolor="#F3F4FF" width="50%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="20%" valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="0%" ></td>
<td width="1%" class="CeldaB">&nbsp;</td>
<td width="30%" class="CeldaB" nowrap>Número de Respuestas</td>
<td width="69%" class="CeldaB" align="left"><select id="NumRespuestas" name="NumRespuestas" onchange="pintarFilas(this.value);">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5" selected>5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
</td>

</tr>
</table>

</fieldset>
</fieldset>


</tr>

</table>




</CENTER>

<input type="hidden" name="campohidden0" value="1">
<input type="hidden" name="campohidden1" value="2">
<input type="hidden" name="campohidden2" value="3">
<input type="hidden" name="campohidden3" value="4">


<!---->
<!-- Campos de la Encuesta-->




</form>
</body>
</html>
  #2 (permalink)  
Antiguo 27/08/2010, 04:11
 
Fecha de Ingreso: marzo-2004
Mensajes: 35
Antigüedad: 20 años, 1 mes
Puntos: 0
Respuesta: Comportamientos extraños dentro de FieldSet con Explorer 6

Se me olvidaba decir que en Firefox funciona perfectamente...

Etiquetas: explorer, fieldset, extraño
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:57.