Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML]Odznaczanie radio
pablosso
post 27.07.2011, 19:47:47
Post #1





Grupa: Zarejestrowani
Postów: 47
Pomógł: 0
Dołączył: 9.05.2011

Ostrzeżenie: (0%)
-----


  1. <script type="text/javascript">
  2. function platpllista()
  3. {
  4. if(document.getElementById("platpl").style.display == "block")
  5. {
  6. document.getElementById("platpl").style.display = "none";
  7. }
  8. else
  9. {
  10. document.getElementById("platpl").style.display = "block";
  11.  
  12. }
  13. }
  14.  
  15. function platplhide()
  16. {
  17. document.getElementById("platpl").style.display = "none";
  18. document.getElementsByName("platpl_radio").checked == false;
  19. }
  20. </head>
  21. <form name="order_details" method="POST">
  22. <tr>
  23. <th colspan=2>asdasd:</th>
  24. </tr>
  25. <tr>
  26. <td style="width: 25px;">
  27. <input type=radio name=platnosc id="a1" value="" onClick="platplhide();"></td><td>
  28. <label for="a1">INPUT a1</label>
  29. </td>
  30. </tr>
  31. <tr>
  32. <td>
  33. <input type=radio name=platnosc id="a2" value="" onClick="platplhide();"></td><td>
  34. <label for="a2">INPUT a2</label>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td style="width: 25px;">
  39. <input onClick="platpllista();" type="radio" name="platpl_radio" value="" id="asd"></td><td>
  40. <label for="asd">asdasdsadasdas</label>
  41. <div id="platpl" style="display:none;">
  42. <table>
  43. <tr>
  44. <td>
  45. <input type=radio name=platnosc id="1" value=""></td><td>
  46. <label for="1">INPUT 1</label>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td>
  51. <input type=radio name=platnosc id="2" value=""></td><td>
  52. <label for="2">INPUT 2</label>
  53. </td>
  54. </tr>
  55. </table>
  56. </div>
  57. </td>
  58. </tr>
  59. </form>
  60. </body>
  61. </html>


Potrzebuje coś takiego, że gdy już zaznaczę radio "asdasdsadasdas" i się rozwinie lista, a następnie jak będę chciał ją schować poprzez kliknięcie na niego jeszcze raz, albo na któryś z "INPUT a1" lub "INPUT a2" to radio "asdasdsadasdas" się odznacza. Oraz jak zrobić żeby radio od "asdasdsadasdas" zostawało na górze po rozwinięciu listy?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 13:23