Populate Text Box with mulitple selctions from list box
hello,
i new livecycle , searched forums answer how populate multiple selections list box text field.
i added calculate field of text field following: textfield14.rawvalue = listbox1.rawvalue
is there way can modify items listbox populate text field values show side side (i.e. california, connecticut, new york) instead of top-down?
joe
i use following js code in 'exit' event of list box
var
listvalue = this.rawvalue; listvalue
= replaceall(listvalue, "\n", " ,"); textfield1.rawvalue
= listvalue;
function
replaceall(oldstr,findstr, repstr) {
var srchndx = 0; // srchndx keep track of in whole line
// of oldstr searching.
var newstr = ""; // newstr hold altered version of oldstr.
while (oldstr.indexof(findstr,srchndx) != -1)
// long there strings replace, loop
// run.
{ newstr
+= oldstr.substring(srchndx,oldstr.indexof(findstr,srchndx));
// put unaltered text 1 findstr to
// next findstr newstr.
newstr
+= repstr;
// instead of putting old string, put in the
// new string instead.
srchndx
= (oldstr.indexof(findstr,srchndx) + findstr.length);
// jump next chunk of text till next findstr.
} newstr
+= oldstr.substring(srchndx,oldstr.length);
// put whatever's left newstr.
return newstr;
} good luck,
More discussions in LiveCycle pre-ES (6.x and 7.x) discussions
adobe
Comments
Post a Comment