Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets and returns the comparison mode for comparing string keys in a Dictionary object.
object.CompareMode[ = compare]
Arguments
object
Required. Always the name of a Dictionary object.
Optional. If provided, compare is a value representing the comparison mode. Acceptable values are 0 (Binary), 1 (Text), 2 (Database). Values greater than 2 can be used to refer to comparisons using specific Locale IDs (LCID).
Remarks
An error occurs if you try to change the comparison mode of a Dictionary object that already contains data.
The following example illustrates the use of the CompareMode property:
[JScript]
function TestCompareMode(key)
{
// Create some variables.
var a, d;
var BinaryCompare = 0, TextCompare = 1;
d = new ActiveXObject("Scripting.Dictionary");
// Set Compare mode to Text.
d.CompareMode = TextCompare;
// Add some keys and items.
d.Add("a", "Athens");
d.Add("b", "Belgrade");
d.Add("c", "Cairo");
return(d.Item(key));
}
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |