Comment desactvier ou plutot griser un radiogroup ??

Comment desactvier ou plutot griser un radiogroup ?? - HTML/CSS - Programmation

Marsh Posté le 25-04-2005 à 16:36:34    

Je suis deja parvenu à gérer quelques événement OnClick en javascript mais la je vois pas trop comment faire pour griser un radiogroup.  
En fait quand le client va choisir une option dans un radiogroup donné, j'aimerais bien que si il fait un certain choix (l'option immediat) que un autre radio group soit désactivé ou grisé(le radiogroup_scheduler).  
 
 
<div class=\"radiogroup_unique\">  
   <form name=\"radiogroup\" method=\"post\" action=\" $PHP_SELF \"  >  
      <input type=\"radio\" name=\"instant\" value=\"immediat\" checked=\"true\"/> Immediat <br>  
        <input type=\"radio\" name=\"instant\" value=\"differe\"  /> Differe  
   </form>  
</div>  
 
<div class=\"radiogroup_scheduler\">  
<form name=\"radiogroup\" method=\"post\" action=\" $PHP_SELF \"  >  
  <input type=\"radio\" name=\"date\" value=\"D\" checked=\"true\" /> Daily <br>  
  <input type=\"radio\" name=\"date\" value=\"W\"  /> Weekly <br>  
  <input type=\"radio\" name=\"date\" value=\"M\"  /> Monthly <br>  
  <input type=\"radio\" name=\"date\" value=\"W\"  /> Yearly  
</form>  
</div>

Reply

Marsh Posté le 25-04-2005 à 16:36:34   

Reply

Marsh Posté le 25-04-2005 à 19:49:00    

En mettant la propriété enabled à false je crois bien :)

Reply

Marsh Posté le 25-04-2005 à 19:49:12    

Ou disabled à true :heink:, à tester :D

Reply

Marsh Posté le 25-04-2005 à 19:49:26    

Ou encore disabled sur "disabled" :??:

Reply

Marsh Posté le 25-04-2005 à 20:49:18    

faudrait deja mettre des noms différents a tes form...


---------------
Nos estans firs di nosse pitite patreye...
Reply

Marsh Posté le 25-04-2005 à 21:00:20    

c'est disabled à disabled :D
 
http://www.w3.org/TR/html401/inter [...] tml#h-17.4


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
Reply

Marsh Posté le 25-04-2005 à 21:03:12    

Ouais en HTML... Mais en DOM :cry:

Reply

Marsh Posté le 25-04-2005 à 21:06:22    

ben s'pareil [:spamafote]
 
my_element.setAttribute('disabled','disabled')
[:spamafote]


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
Reply

Marsh Posté le 25-04-2005 à 21:08:19    

Sauf qu'en DOM2, ils disent :

Citation :

disabled of type boolean
    The control is unavailable in this context. See the disabled attribute definition in HTML 4.01.


donc de type boolean :??:

Reply

Marsh Posté le 26-04-2005 à 08:00:11    

Merci les chouchou en fait c'est bien en mettant disabled à true mais je me suis gourré dans le nom de mon formulaire c'est pour ça que ça marchait pas.
Et merci pour cette adrese c'est ce dont je cherchais:
 
http://www.w3.org/TR/html401/inter [...] tml#h-17.4

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed