alias

msg:4249780 | 11:02 am on Jan 6, 2011 (gmt 0) |
How do your options look like? Do they actually have a 'value'? E.g. <option>Lorem ipsum</option> versus <option value='someValue'>Lorem ipsum</option> - that is the only explanation I see to 'blank' values.
|
Fotiman

msg:4249853 | 3:02 pm on Jan 6, 2011 (gmt 0) |
Also, how is the PickList field "filled from another list box"?
|
Balaji1980

msg:4249943 | 6:12 pm on Jan 6, 2011 (gmt 0) |
Thanks for the replies.... The innerHTML of the PickList looks like this after adding 2 values:
<OPTION value="">ABC</OPTION><OPTION value="">DEF</OPTION> The values are populated from SelectList listbox...below is the code.
var selectList = document.getElementById("SelectList"); var selectIndex = selectList.selectedIndex; var selectOptions = selectList.options; var pickList = document.getElementById("PickList"); var pickOptions = pickList.options; var pickOLength = pickOptions.length; if (selectIndex > -1) { pickOptions[pickOLength] = new Option(selectList[selectIndex].text); pickOptions[pickOLength].value = selectList[selectIndex].value; selectOptions[selectIndex] = null; }
|
Fotiman

msg:4249945 | 6:18 pm on Jan 6, 2011 (gmt 0) |
Instead of this: pickOptions[pickOLength] = new Option(selectList[selectIndex].text); pickOptions[pickOLength].value = selectList[selectIndex].value;
|
| Try doing this: pickOptions[pickOLength] = new Option(selectList[selectIndex].text, selectList[selectIndex].value);
|
|
|
Balaji1980

msg:4249946 | 6:27 pm on Jan 6, 2011 (gmt 0) |
Still same result..!
<OPTION value="">ABC</OPTION>
|
|