Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [HTML][JS] Pojawienie sie submit po zaznaczeniu checkbox
Legro
post
Post #1





Grupa: Zarejestrowani
Postów: 233
Pomógł: 3
Dołączył: 18.07.2005

Ostrzeżenie: (40%)
XX---


W jaki sposob mozna zalatwic taka sprawe, ze przycisk submit pojawi się dopiero po zaznaczeniu pola checkbox? Chodzi o akceptacje regulaminu (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
piraciq
post
Post #2





Grupa: Zarejestrowani
Postów: 174
Pomógł: 4
Dołączył: 27.07.2007
Skąd: Kraków

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


  1. <script type="text/javascript">
  2. function control_checkbox()
  3. {
  4. if(document.getElementById('acc').checked) {
  5. document.getElementById('regulamin').style.visibility = 'visible';
  6. } else {
  7. document.getElementById('regulamin').style.visibility = 'hidden';
  8. }
  9. }
  10. <input type="checkbox" name="regulamin" onClick="control_checkbox();" id="acc" checked="checked" />&nbsp;Zapoznałem się i akceptuje warunki <a href="regulamin.html">regulaminu</a>.</p><br />
  11. <input type="reset" value="Kasuj" /><input type="submit" name="_register" value="Rejestracja" id="regulamin" style="visibility:visible;" />


ja mam takie coś i działa z tym ze w ff a ie nie :/
Go to the top of the page
+Quote Post
erix
post
Post #3





Grupa: Moderatorzy
Postów: 15 467
Pomógł: 1451
Dołączył: 25.04.2005
Skąd: Szczebrzeszyn/Rzeszów




Kod
name="regulamin"
id="regulamin"

IE jest taki tępy, że nie odróżnia id od name. Zmień nazwę któreś z nich i będzie ok.
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: 22.08.2025 - 19:59