I have an parent windows (index.vm) with a search button on it.
When I push the search button I create,with Java script, a child window
(SearchDialog) .
In action class of SearchDialog I want to search in database and if I
get some results then I have to close the child window(SearchDialog)
and I want to call the action for index(parent) to show the results.
 
I hope you understand my question.
Please send me some advices how to manage the problem.
 
Thanx.
 
Below I wrote the screen for parent and child windows.
Index.vm
<script>
function openSearchDialog()
{
 
window.open("$content.getURI("servlet/cms/action/SearchDialog")",
"searchdlg",
"width=360,height=190,dependent='no',menubar='no',locationbar='no',resiz
able='no',status='no'");
}
</script>
 
<table border=0 cellpadding=0 cellspacing=0 bgcolor="#c0c0c0">
            <tr>
                        <td height="40">Search Media Elements</td>
            </tr>
            <tr>
                        <td align="center"><input type="submit"
value="Search" onclick="openSearchDialog();"></input></td>
            </tr>
</table>
 
SearchDialog.vm
<form id="frmSearch" method="post"
action="$link.setAction("SearchDialog")">
    <table>
        <tr>
            <td>Enter search value:</td>
        </tr>
 
        <tr>
            <td><input type="text" size="30" name="searchvalue" value=""
tabIndex="2"></input></td>
            <td><input type="submit" name="searchvalue" value="Search"
tabIndex="3"><td>
        </tr>
    </table>
</form>

Reply via email to