Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Select Definite No of Items Only


Message #1 by Doods Perea <dindo.perea@a...> on Sat, 23 Nov 2002 13:18:26 +0300
Instead of alerting him when he chose less than 10, you could employ a 
more
"proactive" way: disable the submit button when there're not 10 
selections.

<input type=3Dsubmit name=3Dsbmbutton disabled ....> will create a 
disabled
button when the page first loaded.  When he has chosen 10 names, use
document.form_name.sbmbutton.disabled =3D false
to enable it.

> -----Message d'origine-----
> De : Doods Perea [mailto:dindo.perea@a...]
> Envoy=C3=A9 : samedi 23 novembre 2002 11:18
> =C3=80 : javascript
> Objet : [javascript] Select Definite No of Items Only
>
>
> Good day all,
>
> I have a selection of names that would allow a supervisor to select
> exactly 10 employees to be under his group.  I would like to have a
> validation script that would alert him if he chose less than
> 10 and hit
> submit, or disable the other employee names (or
> checkboxes/radio buttons
> for employees) if he already has selected 10 employees.
>
> Could anyone please help me with how I can implement this?
>
> Thanks,
> Doods
>
>
>

  Return to Index