Dear Khaled, On click of a button (From Parent Window), I call the below JS fuction, which opens up the Popup window. Please note I modified the size of the popup here. //OPEN THE COMMENTS WINDOW function openAnalysis(strPath) { //Added For Defect Id : UAT 242 var elem = document.getElementById('leftmenutree'); elem.style.display = "block"; elem = document.getElementById('dummyimage'); elem.style.display = "none"; elem = document.getElementById('imgdummyHide'); elem.style.display = "none"; elem = document.getElementById('testLayer1'); if(elem.style.display != "none") { toggle('testLayer1','/LA_New'); document.getElementById("imgHide").src="../../Images/show.jpg"; }
if (screen.width==1024) { var left = (screen.width/2)-138; //Added For Defect Id : UAT 377 isPopupOpen1 = window.open(strPath,"","height=712,width=640,top=0,left=" + left +",resizable=yes,minimize=yes,scrollbars=1,resizable=0") } else { var leftHigher = (screen.width/2)-10; //Added For Defect Id : UAT 377 isPopupOpen1 = window.open(strPath,"","height=967,width=640,top=0,left=" + leftHigher +",resizable=yes,minimize=yes,scrollbars=1,resizable=0") } }
And when the Popup is window I resize the parent window. Below is the code which I have written in the HTML of the popup. This is present just before the body tag ends.
<script language="javascript"> //This resizes the parent screen on load of the page opener.resizeTo((screen.height-390),(screen.width-279)); toggleLube('tblRemarks','imgRemarks'); </script> </BODY>
|