Parse String Issues
Hello,
I have a form that contains data in a read-only, tab delimited, format. The element name is BankAddAccess.Role1. I am having troubles extracting each value into an array of values, here is the code I am using:
var exOption, exDictionary, exResult, fieldVal, testVal;
exDictionary = document.all['BankAddAccess.Role1'];
fieldVal = exDictionary.value;
while((exResult = fieldVal.split(/\t,\r/)) != null) {
alert(exResult[0]);
break;
}
The array ends up with the full string as the first value. Is there something I'm missing here? Thank you for any help you can provide.
|