I am trying to write a simple Javascript code to pass value from a
listbox to another field
the following is my code
f=document.form s[0];
window.alert(f. FieldList.optio ns.length)
for(i=0;i<f.Fie ldList.options. length;i++)
{
if(f.FieldList. options[i].selected){
sReturn=f.Field List.options[i].value -------> this line doesn't seem
to work.
sReturn+=sRetur n +","
window.alert(sR eturn)}
}
Target=document .forms[0].RefTargetField .value;
TargetField=eva l("window.opene r.document.form s[0]." +Target);
TargetField.val ue=sReturn;
window.close()
Can help me figure out what I need to do to get the selected value to
sReturn?
Thanks
listbox to another field
the following is my code
f=document.form s[0];
window.alert(f. FieldList.optio ns.length)
for(i=0;i<f.Fie ldList.options. length;i++)
{
if(f.FieldList. options[i].selected){
sReturn=f.Field List.options[i].value -------> this line doesn't seem
to work.
sReturn+=sRetur n +","
window.alert(sR eturn)}
}
Target=document .forms[0].RefTargetField .value;
TargetField=eva l("window.opene r.document.form s[0]." +Target);
TargetField.val ue=sReturn;
window.close()
Can help me figure out what I need to do to get the selected value to
sReturn?
Thanks
Comment