Witam forumowiczów.Mam kłopot z rozszyfrowaniem ukrytego pola tekstowego po kliknięciu na pole RADIO ( opcja Marital status => Divorced ), przykład na stronie www.quirksmode.org/dom/usableforms.html
Nijak mimo wielu prób wychodzi cały formularz ale bez tego ukrytego pola. Czy byłby ktoś pomocny i doradził co jest z tym kodem nie tak ?
Dokładnie muszę zrobić formularz m.in. z 2 polami RADIO z możliwością wyboru tylko 1 z nich gdzie dodatkowo przy jedym z pól RADIO jest ukryty po jego wybraniu pole TEXT.


  1. <script type="text/javascript" src="/correct/path/usableforms.js"></script>
  2.  
  3. <tr>
  4. <td class="question"><label for="country_other">Country</label></td>
  5. <td>
  6. <input type="checkbox" name="country_other" id="country_other" rel="other_country" />
  7. Other than The Netherlands
  8. </td>
  9. </tr>
  10. <tr rel="other_country">
  11. <td class="question"><label for="other_country">
  12. <span class="accessibility">If not the Netherlands:</span> Which other country?</label></td>
  13. <td><input name="other_country" id="other_country" /></td>
  14. </tr>
  15. <tr>
  16. <td class="question">Marital status</td>
  17. <td>
  18. <input type="radio" name="marital" value="single" rel="none" id="marital_single" />
  19. <label for="marital_single">Single</label><br />
  20. <input type="radio" name="marital" value="married" rel="marriageContract" id="marital_married" />
  21. <label for="marital_married">Married</label><br />
  22. <input type="radio" name="marital" value="divorced" rel="divorceDetails" id="marital_divorced" />
  23. <label for="marital_divorced">Divorced</label><br />
  24. </td>
  25. </tr>
  26. <tr rel="marriageContract">
  27. <td class="question"><label for="marriage_contract">
  28. <span class="accessibility">If Married:</span> Marriage contract?</label></td>
  29. <td><input type="checkbox" name="marriage_contract" id="marriage_contract" /> Yes</td>
  30. </tr>