Potrzebuję Waszej pomocy, bo nie mogę jakoś znaleźć satysfakcjonującego mnie rozwiązania.
Sprawa wygląda tak: mam prosty formularz
<form method="post" action=""> <div id="device"> </div> <div id="serial1" style="display:none"> <input type="text" name="s1" value="" /> <select name="card1"> </select> </div> <div id="serial2" style="display:none"> <input type="text" name="s2" value="" /> <select name="card2"> </select> </div> <input type="hidden" name="serial" value="" /> <input type="hidden" name="card" value="" /> <input type="submit" value="test" name="test"/> <form>
oraz prosty skrypt:
$(document).ready(function () { $('#device1').click(function () { $('#serial1').show("fast"); $('#serial2').hide("fast"); }); }); $(document).ready(function () { $('#device2').click(function () { $('#serial2').show("fast"); $('#serial1').hide("fast"); }); });
Oto co chciałbym osiągnąć BEZ przeładowania strony:
Gdy wybiorę np. Device 1, wypełnię input s1 i wybiorę wartość z listy card1, to chciałbym żeby te wartości zostały wysłane odpowiednio do ukrytych inputów serial i card. Następnie żeby wartości te zostały wyświetlone w alercie.
Niby proste, ale jakoś nie bardzo wiem jak to zrobić...
Z góry dzięki za pomoc.