Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JS][HTML] Różne zachowania w różnych przeglądarkach
nexis
post
Post #1





Grupa: Zarejestrowani
Postów: 1 012
Pomógł: 109
Dołączył: 26.09.2003
Skąd: nexis.pl

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


Jest sobie strona:

http://nexis.pl/enpm/?go=registration

Po kliknięciu na checkbox o nazwie REGISTRATION FORM for accompanying person wyświetla się dodatkowe pole oraz zostaje zablokowany wybór single room. Za całość odpowiedzialny jest kod:

  1. function accompany () {
  2. if (document.getElementById('registration_form_for_accompanying_person').checked) {
  3. document.getElementById('accompanying_person').style.display = 'block';
  4. document.getElementById('single').checked = false;
  5. document.getElementById('single').disabled = true;
  6. document.getElementById('double').checked = true;
  7. } else {
  8. document.getElementById('accompanying_person').style.display = 'none';
  9. document.getElementById('single').disabled = false;
  10. document.getElementById('single').checked = true;
  11. }
  12. }


Całość ładnie działa pod IE 7.0, ale pod Firefox niestety już nie. Wiecie może dlaczego? Jeśli się nie mylę to chodzi o linijkę:

  1. document.getElementById('registration_form_for_accompanying_person').checked
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
skowron-line
post
Post #2





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

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


Cytat(nexis @ 15.05.2007, 11:54:53 ) *
Jeśli się nie mylę to chodzi o linijkę:

  1. document.getElementById('registration_form_for_accompanying_person').checked


niemylisz sie

Kod
Błąd: document.getElementById("registration_form_for_accompanying_person") has no properties
Plik źródłowy: http://nexis.pl/enpm/js/show.js
Wiersz: 2


a co to znaczy to juz chyba wiesz
Go to the top of the page
+Quote Post

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: 20.12.2025 - 23:20