Categories | Question details Back To List | ||
window URL return value hi, I am using dhtmlx window..its wonderful, i have a requirement like When user select search button i need to come up with a dhtmlxwindow in which i am calling my searching jsp page url...its working perfect. But after selecting required value from the search result, i need to pass the value back to the page where user select the search button. appreciate if you comeup with an answer. regards murray. Answer posted by Support on Nov 14, 2008 05:20 Hello, Try this: main_page.html >> var selectedValue = null; // here will selected value var dhxWins = new dhtmlXWindows(); ... dhxWins.window(id).attachURL("inner_page.jsp"); ... inner_page.jsp >> <select id="mySelect"> <option value="1">one</option> <option value="2">two</option> </select> <input type="button" value="Select" onclick="doOnSelect();"> <script> function doOnSelect() { var sel = document.getElementById("mySelect"); var val = sel.options[sel.selectedIndex].value; ... // passing value to selectedValue variable to main_page.html parent.selectedValue = val; // and closing the window (optionaly) parent.dhxWins.window(id").close(); } </script> Note that selectedValue and dhxWins (if you are clising window from inner page) should be global variables. |