我有一个文本字段。和一个搜索按钮,后跟文本框。单击搜索按钮时,将打开一个新的弹出窗口。从窗口中,我将从填充的 id 中选择一个 id。在选择单选按钮时,弹出窗口将关闭,并且父窗口中的文本框保存选定的 id。,使用
opener.document.profile.inp_type.value = val2;
window.close();
我的要求是,
在弹出窗口关闭并且文本框从弹出窗口中获取值后,我需要根据选择的 id 将下面选择框中的一些值加载到文本框中。那么我该怎么做呢?
<input type="text" value="" id="inp_type" name="inp_type" /> <img src="" onclick="openPopUp()" />
<select name="sel1" id="sel1" >
<!--
When the textbox get the id from popup window, I need to load some data here.
-->
</select>