Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/02/2005, 07:04
yokoshima
 
Fecha de Ingreso: febrero-2005
Ubicación: chile, Santiasko
Mensajes: 728
Antigüedad: 19 años, 3 meses
Puntos: 1
Muchas gracias... pero tengo una pequeña duda en el radio cuando le coloco que "No" me vuelve a deshabilitar el radio pero queda marcado la opcion que eleji, osea si escribo algo en el text y elijo fulltime cuando le coloco el radio No me borra lo que habia escribido en el text y en cuanto al radio queda todavia marcado fulltime. es algo minimo pero igual se vee feo...

este es el codigo ahora:
Javascript:
Código PHP:
  <script language="JavaScript"
function 
habilitainfo(){ 
    
with (document.form1
    {     
EMPRESA_ACTUAL.disabled false
for (
i=0i<regimen.lengthi++) regimen[i].disabled false
    } 


   function 
deshabilitainfo(){ 
   
with (document.form1)
   {
     
EMPRESA_ACTUAL.disabled true
     
form1.EMPRESA_ACTUAL.value ""
    
    for(
i=0i<regimen.lengthi++) regimen[i].disabled true;
          
regimen.disabled true
          
regimen.checked false;
    }
   } 
</script> 
y este el formulario:
Código PHP:
  <table width="100%" border="0"  align="center" cellspacing="0" cellpadding="0">
    <
tr
     <
tr
    <
td colspan="4" class="ttitulo style11"><strong>Informaci&oacute;n Actual</strong></td>
    <
tr
      <
td width="50%">Trabaja actualmente (*)</td>
      <
td width="50%">R&eacute;gimen (*)</td>
    </
tr>
    <
tr
      <
td><input type="radio" name="trabajo" value="SI" onClick="habilitainfo()">
        
Si 
        
<input type="radio" name="trabajo" value="NO" onClick="deshabilitainfo()">
        
No</td>
      <
td><input type="radio" name="regimen" value="FULLTIME" disabled>
        
Full Time 
        
<input type="radio" name="regimen" value="PARTTIME" disabled>
        
Part Time 
        
<input type="radio" name="regimen" value="INDEPENDIENTE" disabled>
        
Independiente <br>
        <
input type="radio" name="regimen" value="ESTUDIANTE" disabled>
        
Estudiante 
        
<input type="radio" name="regimen" value="DESEMPLEADO" disabled>
        
Desempleado</td>
    </
tr>
    <
tr
      <
td>Empresa</td>
      <
td>&nbsp;</td>
    </
tr>
    <
tr
      <
td><input type="text" name="EMPRESA_ACTUAL" disabled></td>
      <
td>&nbsp;</td>
    </
tr>
  </
table
El que me entendio porfis ayude.......gracias de todas formas
Cita:
Iniciado por angsanchez
He jugado un poco y he dado con ello:
Código PHP:
function habilitainfo(){ 
    
with (document.form1)
    {    
EMPRESA_ACTUAL.disabled false
for (
i=0i<regimen.lengthi++) regimen[i].disabled false
    }

(Básicamente, hay que recorrer los radios uno por uno.)
__________________
Una Vez Muerto el Perro.............Se acaba la Rabia :risa: