- I have a parent window named worklist.jsp
- Parent window has a button. on click of the button, it calls a function named getEventLogUser().
- getEventLogUser() function in turns calls a function named popupWindowWithPost() which opens the child window. both the function is in separate js file(utility.js)..
- My need is, i have to disable the parent window when child is opened.
worklist.jsp:
<div class="claro" id="menuDiv21" onclick="setWidgetproperty(this.id,'x','navMenu21');" onmousedown="setMenuBarProperty('navMenu21');" onmouseup="setDocStyle(this.id)" style="border:1px dotted white; left: auto; position: absolute; top: 620px;">
<div dojotype="dijit.MenuBar" id="navMenu21" style="font-size:11pt;" title="MenuBar">
<div dojotype="dijit.MenuBarItem" id="SearchMenu21" onclick="getEventLogUser();setMenuId(this.id);" style="font-size:11pt;" title="menuBarItem">
<img class="images" id="SearchMenu21" name="search5.png" onclick="setImgProperty(this.id)" src="images/uploads/search.png" style="height:20px; width:20px;">
Search
</div>
</div>
</div>
utility.js:
function getEventLogUser(){
var dummyvar = document.getElementById("CWPROCESSEVENTLOG.OBJECT_ID").value;
popupWindowWithPost("eventLogUser.jsp",'height=600px,width=960px,top=50px,left=150px,scrollbars=no,sizable=yes,toolbar=no,statusbar=no','processManager',dummyvar);
}
function popupWindowWithPost(url, windowoption, name, params)
{
var form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", url);
form.setAttribute("target", name);
var input = document.createElement('input');
input.type = 'hidden';
input.name = "PARAM";
input.value = params;
form.appendChild(input);
document.body.appendChild(form);
window.open(url, name, windowoption);
form.submit();
document.body.removeChild(form);
}