Hi
I have a field called method, which has values like
App,BCC,DED
using the below function im trying to delimit with ":", so the values
should be like
"App","BCC","DED"
but the sLookupKey has a value like:
App":"BCC":"DED":"
2 issues are above, the first " is missing
the last it adds up with :" again for value that is not available
var sFieldVal = trim(document.forms[0].Method.value);
var sFieldValArray = null;
var sLookupKey = "";
if ( sFieldVal.indexOf(",") != -1 )
{
sFieldValArray = sFieldVal.split(",");
for (n=0; n<sFieldValArray.length; n++)
{
sLookupKey += (sFieldValArray[n]+'":"');
}
}
else
{
sLookupKey = sFieldVal;
}
can you pls. help
Sathya