>- see footer for list info -<
Yep, but if the list only contains valid options (ie. the first select
is a legit option), then there is no need to mark it as required, seeing
as you would never put a "Please select an option" type option anywhere
but position 0, would ya :) ?!?
________________________________
From: Charlie Arehart [mailto:[EMAIL PROTECTED]
Sent: 13 July 2006 20:47
To: 'Coldfusion Development'
Subject: RE: [CF-Dev] cfselect
>- see footer for list info -<
Well, it's another approach, yes. Of course, one would have to
be careful
with yours to not have it take effect if one ever DID have a
Select box with
a legit value as the first option. :-) The solution would seem
to be to add
a boolean attribute to CFSELECT, like FirstOptionAsMessage.
Otherwise, the approach offered in the CFMX 7 docs at least let
the
developer control the behavior via the HTML select value (using
the space).
Anyway, there are certainly many approaches to solve the
problem. I'm sure
they were juggling many use cases and concerns. :-) I think a
new attribute
would be the most straightforward.
/charlie
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
Duddell
Sent: Thursday, July 13, 2006 11:35 AM
To: Coldfusion Development
Subject: RE: [CF-Dev] cfselect
>- see footer for list info -<
IF you can/want to change the cfform.js, thhe fix I did also
works, without
having to check for a space, or add a space ass the value for
the first
option ...
cfform.js ORIGINAL ...
else if (obj_type == "SELECT")
{
for (i=0; i < obj.length; i++)
{
if (obj.options[i].selected)
return true;
}
return false;
}
What I changed it to (only a few extra lines) ...
else if (obj_type == "SELECT")
{
if(obj.multiple) {
StartFrom=0;
}
else {
StartFrom=1;
}
for (i=StartFrom; i < obj.length; i++)
{
if (obj.options[i].selected)
return true;
}
return false;
}
_______________________________________________
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 -<