How to disable parent window while child window appear by clicking button on parent window

后端 未结 3 428
星月不相逢
星月不相逢 2021-01-14 04:42

I have designed one window in jsp in which there is a search button. when user clicks \"search\" button, the new window appears. But at this time i want my parent window to

3条回答
  •  感情败类
    2021-01-14 05:18

    function openSearchPopUp() { 
      popupWindow= window.open(url,'window','width=800,
                               height=600,location=yes,
                               menubar=‌​yes,scrollbars=yes,
                               resizable=yes'); 
      popupWindow.focus(); 
      document.onmousedown = focusPopup; 
      document.onkeyup = focusPopup; 
      document.onmousemove = focusPopup; 
    } 
    
    function focusPopup() {
      if(popupWindow && !popupWindow.closed) { popupWindow.focus(); } 
    } 
    

提交回复
热议问题