My code
What I want to do. Pass the value of the selection, "which will be one of
the entries in the array", and I want to find the index of that entry. If
there is a way around it please help.
Code:
var supp = new Array(61);
supp[0] = "Allied Van Lines - Berger Transfer";
supp[1] = "Allied Van Lines - Nor-Cal Moving Services";
supp[2] = "Allied Van Lines - Whalen's";
supp[3] = "Anthro Corporation";
supp[4] = "Avis Rent-A-Car";
supp[5] = "Barn Door";
supp[6] = "Beckman Coulter";
supp[7] = "Bretford Manufacturing";
supp[8] = "Budget Rent A Car";
supp[9] = "Carlick Imaging Products";
supp[10] = "Carlick Imaging Products";
supp[11] = "Carlick Imaging Products";
supp[12] = "Centimark Roof Systems";
supp[13] = "Cleaning Technologies Group";
supp[14] = "Compucom Systems, Inc.";
supp[15] = "David Edward Company, Ltd.";
supp[16] = "DHL Express";
supp[17] = "Disys";
supp[18] = "DM Transportation Management Services";
supp[19] = "Egan Visual";
supp[20] = "Falcon Companies - Charlotte-Epic-Howe-Johnson-Thonet";
supp[21] = "Fisher Scientific";
supp[21] = "Fixtures Furniture";
supp[22] = "***lord";
supp[23] = "GovConnection";
supp[24] = "Grainger";
supp[25] = "Gunlocke Company";
supp[26] = "Hertz Corporation";
supp[27] = "Hewlett Packard (Compaq Computers)";
supp[28] = "High Point Furniture";
supp[29] = "Hireright";
supp[30] = "IBM";
supp[31] = "ICI Dulux Paint";
supp[32] = "Infocus";
supp[33] = "IVCi";
supp[34] = "JP Morgan Chase";
supp[35] = "KI (Texas Only)";
supp[36] = "KLN Steel Products Co.";
supp[37] = "M-D Wholesale Hardware";
supp[38] = "Menlo Worldwide";
supp[39] = "Milliken Carpet";
supp[40] = "Nova Solutions";
supp[41] = "OfficeMax - A Boise Company";
supp[42] = "Polyvision";
supp[43] = "Ricoh Corporation";
supp[44] = "***auer (Interlink Brands)";
supp[45] = "Shaw Contract Floor.";
supp[46] = "SKC";
supp[47] = "Smith Systems";
supp[48] = "Software House International (SHI)";
supp[49] = "Southwest Contract (Texas Only)";
supp[50] = "Specialty Underwriters, LLC";
supp[51] = "Steelcase - Braytonspaces (Healthcare) - Brayton International
- Details - Metro Furniture -Turnstone - Vecta";
supp[52] = "Technology Integration Group (TIG)";
supp[53] = "United Van Lines - Armstrong Relocation";
supp[54] = "United Van Lines - East End/Corrigan Moving & Storage";
supp[55] = "United Van Lines - Suddath Relocation Systems";
supp[56] = "VWR International (Centrifuges)";
supp[57] = "VWR International (LF)";
supp[58] = "VWR International (LP)";
supp[59] = "VWR International Canada";
supp[60] = "Xerox Corporation";
var text = "DHL Express";
for (i=0;i<supp.length;i++)
{
if (supp[i] == text )
{
alert(i);
}
}
I'm using the alert for testing purposes to see if i'm getting a number.
Once I do get the # then I can do some other stuff with it.
HOWEVER, if there is a way to just get the ID instead of the VALUE that
would bew FANTASTIC!
Thanks all.
KB
Error:
ERROR BOX.
Message: an error has occurred for more information please contact system
admin...
Thanks.
|