Disable parent window while child window is opened using javascript
<ul>
<li>I have a parent window named worklist.jsp</li>
<li>Parent window has a button. on click of the button, it calls a function named getEventLogUser().</li>
<li>getEventLogUser() function in turns calls a function named popupWindowWithPost() which opens the child window. both the function is in separate js file(utility.js)..</li>
<li>My need is, i have to disable the parent window when child is opened.</li>
</ul>

<p>worklist.jsp:</p>

<pre><code>&lt;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;"&gt;
     &lt;div dojotype="dijit.MenuBar" id="navMenu21" style="font-size:11pt;" title="MenuBar"&gt;
          &lt;div dojotype="dijit.MenuBarItem" id="SearchMenu21" onclick="getEventLogUser();setMenuId(this.id);" style="font-size:11pt;" title="menuBarItem"&gt;
               &lt;img class="images" id="SearchMenu21" name="search5.png" onclick="setImgProperty(this.id)" src="images/uploads/search.png" style="height:20px; width:20px;"&gt;
               Search
          &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>utility.js:</p>

<pre><code>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);
}
</code></pre>
