Es muss so heissen: onsubmit="return check();"
Stephan
Mayer, Stefan schrieb:
Nun, da kommt jetzt wohl die Meldung, das Formular wird trotzdem abgeschickt....
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Bandt Sent: Dienstag, 25. J�nner 2005 10:20 To: [email protected] Subject: RE: [Coffeehouse] Checkbox bei Submit "pr�fen"?
<script> function check() { if(document.getElementById('myBox').checked!=true) { alert('Bitte Box anhaken'); return false; } } </script>
<form onsubmit="check();" action="http://www.google.de" method="get"> <input type="checkbox" id="myBox" value="-1" /> <input type="submit" value="Go" /> </form>
Gru�, Thomas _____________________________________ http://blogs.dotnetgerman.com/thomas/
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mayer, Stefan Sent: Tuesday, January 25, 2005 10:11 AM To: [email protected] Subject: [Coffeehouse] Checkbox bei Submit "pr�fen"?
Frage: Wie kann ich in einem Formular vor dem Submit pr�fen, ob eine Checkbox angehakt ist?
_______________________________________________ Coffeehouse Mailingliste, Postings senden an: [email protected] An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/coffeehouse
_______________________________________________ Coffeehouse Mailingliste, Postings senden an: [email protected] An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/coffeehouse _______________________________________________ Coffeehouse Mailingliste, Postings senden an: [email protected] An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/coffeehouse
_______________________________________________ Coffeehouse Mailingliste, Postings senden an: [email protected] An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/coffeehouse
