- see footer for list info -<
ugh to auto-generated code. Ugh I say.

<script>
   function chkForm() {
       var errArr = new Array();
       with (document.selectForm) {
           if (!mySelect.options[mySelect.options.selectedIndex].value.length)
{
               errArr[errArr.length] = "You haven\'t chosen one of the
things in the list thingie you spazzock. Do it."
           }
       }
       if (errArr.length) {
           alert('You\'ve been silly innit:\n\n- ' + errArr.join('\n- '));
           return false
       } else {
           return true
       }
   }
</script>
<form action="#" method="get" name="selectForm" onsubmit="return
chkForm();">
<select name="mySelect">
   <option value="">--Please Select An Option--</option>
   <option value="Super">John Craven</option>
   <option value="Smelly">Some Cheese</option>
   <option value="Lemons">Tony Slattery</option>
   <option value="Kinkajus in a bucket of ice">Moira Stewart</option>
</select>
</form>

On 7/13/06, Andrew Davidson <[EMAIL PROTECTED]> wrote:

>- see footer for list info -<
Am fixing up someone else's code, and they have a cfselect in there that
is set required="yes", which doesn't work at all, in that the first option
in the select list, which is along the lines of "Please select an option",
still passes the required check (which it shouldn't). I haven't used cfform
much myself, so is this correct ? If it is, then that is pretty useless,
isn't it ?

---------------------------------
Inbox full of spam? Get leading spam protection and 1GB storage with All
New Yahoo! Mail.
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to