Re: Checked checkboxes
From: Roland Hall (nobody_at_nowhere)
Date: 02/23/05
- Next message: Brian Beam: "Re: Controlling appearance of new/current window"
- Previous message: Brian Beam: "Re: Controlling appearance of new/current window"
- In reply to: Rolf Rosenquist: "Re: Checked checkboxes"
- Next in thread: RobB: "Re: Checked checkboxes"
- Reply: RobB: "Re: Checked checkboxes"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 22 Feb 2005 18:50:48 -0600
"Rolf Rosenquist" <rolf@nomail.com> wrote in message
news:OsT8QaSGFHA.1140@TK2MSFTNGP10.phx.gbl...
:I have not meant that this way was wrong. As I mentioned in other mails
here
: during the ride, I am not so familiar with Javasript, that I can decide
: that. Therefore when you gave me your tip, I was (and am) too ignorant to
do
: the rest needed to make it work. Some other kind guys helped me to get it
: working after some postings back and forth and I now have another puzzle
: piece to look at and try to learn more out of it, now that I have a
: solution.
For Dave...
<script type="text/javascript">
// Written by Roland Hall - http://kiddanger.com/lab/check1.html
function verifycheckboxes() {
var ok = false;
var e = document.getElementsByName('datum'); // Following Dave's advice
for(var i = 0; i < e.length; i++) {
e[i].checked ? ok = true : null;
if(ok) { return true };
}
alert("You have to check at least one!");
return false;
}
</script>
-- Roland Hall /* This information is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. */ Technet Script Center - http://www.microsoft.com/technet/scriptcenter/ WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp
- Next message: Brian Beam: "Re: Controlling appearance of new/current window"
- Previous message: Brian Beam: "Re: Controlling appearance of new/current window"
- In reply to: Rolf Rosenquist: "Re: Checked checkboxes"
- Next in thread: RobB: "Re: Checked checkboxes"
- Reply: RobB: "Re: Checked checkboxes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|