I just found this posted by a user in the LiveDocs and it works great!

What you need to do is to edit the javascript that the CF server writes so that 
it also checks for a null value (your value="" part of your first option item). 
This is a simple code change in a javascript template file.  Edit this file:

C:\CFusionMX7\wwwroot\CFIDE\scripts\cfform.js 

Inside this file, modify line #73 this way: 

ORIGINAL:
else if (obj_type == "SELECT")
{
for (i=0; i < obj.length; i++)
{
if (obj.options[i].selected)
return true;
}
return false;
} 

MODIFIED:
else if (obj_type == "SELECT")
{
for (i=0; i < obj.length; i++)
{
if (obj.options[i].selected && obj.options[i].value != "")
return true;
}
return false;
} 

You may need to restart your coldfusion service, but otherwise this will work 
with the standard required="yes" method in your cfselect tag.

Giving credit where credit is due:
http://livedocs.macromedia.com/coldfusion/5.0/CFML_Reference/Tags91.htm

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211915
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to