<script>
function listFindNoCase(theList, theValue, theDelim)
{
var i = 0;
var returnValue = 0;
var theArr = new Array();
theArr = theList.split(theDelim);
for(i=0; i < theArr.length; i++)
{
if(theArr[i].toLowerCase() == theValue.toLowerCase())
{
returnValue = i+1;
break;
}
}
return returnValue;
}
alert(listFindNoCase('one,two,tHree,four', 'Three', ','));
</script>
..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Friday, January 18, 2008 12:16 PM
To: CF-Talk
Subject: SOT: JavaScript version of listContains()
Does anybody know if there is a simple, basic JavaScript equivalent of
the CFML listContains() function that can determine if a given value is
one of four possible values.
TIA
Ian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296832
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4