Functionality is like when pressing 'CTRL+click' on drop down list in the main jsp page, a popup window appears with a list box contains all the values of the drop down clicked on the main page. But some times when we expand the drop down and press "CTRL+click" on any of the options in the main jsp, values are not getting populated in the popup window List box. Is any other options to load values from main jsp to popup jsp fle?
Pls see the code used in the popup window to list the values:
Expand|Select|Wrap|Line Numbers
- <script>
- function populateList() {
- var size = eval("window.opener.document.forms[0]."+elementName+".length");
- for(var i = 0;i<Number(size);i++){
- var txt = eval("window.opener.document.forms[0]."+elementName+".options["+i+"].innerText");
- var val = eval("window.opener.document.forms[0]."+elementName+".options["+i+"].value");
- var newOption = new Option(txt, val, false, false);
- document.forms[0].listBox.options[i] = newOption;
- }
- }
- </script>
- <body onload = "javascript:populateList();">