Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem z formularzem, Jak po wybraniu pozycji wyświetlić bez przeładowania drugę listę
cachaito
post
Post #1





Grupa: Zarejestrowani
Postów: 27
Pomógł: 0
Dołączył: 15.06.2009

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


Witam!

Mam prosty formularz:

  1. <label for="zodiac">Choose your zodiac sign:</label>
  2. <select name="zodiac" size="1">
  3. <optgroup label="Your zodiac sign:">
  4. <option value="leo">Leo</option>
  5. <option value="virgo">Virgo</option>
  6. </select>
  7.  
  8. <label for="more">Tell me more about you:</label>
  9. <select name="more" id="leo" size="1">
  10. <optgroup label="Tell me exacly about your leo sign:">
  11. <option value="first">I am from July</option>
  12. <option value="second">"I am from August"</option>
  13. </select>
  14.  
  15. <select name="more" id="virgo" size="1">
  16. <optgroup label="Tell me exacly about your virgo sign:">
  17. <option value="first">"I am from August</option>
  18. <option value="second">"I am' from September"</option>
  19. </select>


Listy #leo i #virgo są ukryte (display:none;). Jak zrobić (najlepiej z pomocą jQuery...) aby po wybraniu znaku zodiaku z listy pierwszej pojawiła się odpowiednia lista dla danego znaku? Chodzi o to, że gdy nacisnę na opcję Leo pojawia się
  1. <label for="more">Tell me more about you:</label>
  2. <select name="more" id="leo" size="1">
  3. <optgroup label="Tell me exacly about your leo sign:">
  4. <option value="first">I am from July</option>
  5. <option value="second">"I am from August"</option>
  6. </select>
zaś gdy zmienię zdanie i nacisnę Virgo, lista Leo chowa się i pojawia:
  1. <select name="more" id="virgo" size="1">
  2. <optgroup label="Tell me exacly about your virgo sign:">
  3. <option value="first">"I am from August</option>
  4. <option value="second">"I am' from September"</option>
  5. </select>


Będę wdzięczny za wszelkie wskazówki...

Ten post edytował cachaito 23.08.2010, 16:34:09
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 10.06.2026 - 10:05