Ver Mensaje Individual
  #7 (permalink)  
Antiguo 20/11/2002, 11:50
Avatar de Kaopectate
Kaopectate
Colaborador
 
Fecha de Ingreso: diciembre-2001
Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 22 años, 4 meses
Puntos: 38
Revisa este ejemplo:

Código PHP:
<html>
 <
head>
  <
script language="JavaScript">

   var 
muestraTexto false;

   function 
cambiaSelector(){
    
with (window.pantalla.document){
     
muestraTexto = (frm.selector.selectedIndex == 1truefalse);
    }
    
formulario();
   }

   function 
formulario(){
    
with (window.pantalla.document){
     
open();
     
writeln("<html>\n<body>");
     
writeln("<form name='frm'>");
     
writeln("<select name='selector' onchange='parent.cambiaSelector()'>");
     
writeln(" <option" + (muestraTexto""" selected") + ">Combo solo</option>");
     
writeln(" <option" + (muestraTexto" selected""") + ">Combo y texto</option>");
     
writeln("</select>");
     
writeln("<br>");
     if (
muestraTexto){
      
writeln("<input type='text' name='campoTexto' value='algo'>");
     }
     
writeln("</form>");
     
writeln("</body>\n</html>");
     
close();
    }
   }


   
document.writeln("<frameset rows='100%,*' onload='javascript:parent.formulario()'>");
   
document.writeln("     <frame name='pantalla' src='DummyPage.htm'>");
   
document.writeln("     <frame src=''>");
   
document.writeln("</frameset>");

  
</script>
 </head>
</html>