Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> aktyne- nieaktywne pola
1maciek
post
Post #1





Grupa: Zarejestrowani
Postów: 75
Pomógł: 0
Dołączył: 12.10.2004

Ostrzeżenie: (10%)
X----


witam, taki problem
mam fromularz z 2 polami radio a obok kazdego jest lista select,
chce aby aktywna byla tylko ta lista przy ktorej jest wlaczone pole radio, a druga w tym czasie byla nie aktywna i odwrotnie
dzieki za kazdy pomysl
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
revyag
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 258
Pomógł: 16
Dołączył: 21.09.2004
Skąd: Kielce

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


Kod
<script type="text/javascript">
function mr(dis,en){
    document.getElementById(dis).disabled="disabled";
    document.getElementById(en).disabled="";
}
</script>

  1. <input name="rad" type="radio" value="1" onclick="mr('s2','s1')" />
  2. <select id="s1" onchange="" disabled="disabled">
  3. <option value="1">dane1</option>
  4. <option value="2">dane2</option>
  5. </select>
  6. <input name="rad" type="radio" value="2" onclick="mr('s1','s2')" />
  7. <select id="s2" onchange="" disabled="disabled">
  8. <option value="3">dane3</option>
  9. <option value="4">dane4</option>
  10. </select>


--------------------
-------------

------
Go to the top of the page
+Quote Post

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 Aktualny czas: 21.08.2025 - 05:35