Ahh... I didn't know that... never used radio buttons before ... I'll
check out that possibility

-----Original Message-----
From: Lofback, Chris [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 9:10 AM
To: CF-Talk
Subject: RE: JS help - checkboxes

Would it make more sense to use radio buttons, which only allow one
selection?


Chris

-----Original Message-----
From: Tim Laureska [mailto:[EMAIL PROTECTED]
Sent: Friday, April 09, 2004 8:52 AM
To: CF-Talk
Subject: JS help - checkboxes

I have a little script that throws up an alert when more than 1 checkbox
is selected.  However, is there some code I can put in this script that
will also prevent anything else in the cold fusion page from processing
until the "more than one" checkbox problem is corrected?  Here's the
script:

<SCRIPT LANGUAGE="_javascript_">
<!-- Begin
function anyCheck(form) {
var total = 0;
var max = form.type_no.length;
for (var idx = 0; idx < max; idx++) {
if (eval("document.registration.type_no[" + idx + "].checked") == true)
{
    total += 1;
if (total >1) alert("You cannot select more than 1 registration type");
   }
}

}
//  End -->
</script>

TIA
Tim
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to