This javascript function will help you to disable the focus of parent window when child popup window arises in a webpage.
Features
a)You can get the popup window functionalities and the script to disable parent window using this javascript .
b)Parent window works only when child window is closed.
c)Simple and ease of use.
d)Just copy the code in to your page and use it.
Preview
click the button to see the preview. Works only in Internet Explorer(IE)
Code
JAVASCRIPT CODE.
Javascript code
<!-- Script by hscripts.com -->
<script type="text/javascript">
function topWindow() {
var popup = window.open('simplett.html','Testing','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollb ars=no,resizable=no,width=400,height=200,left=350,top=200');
popup.focus();
}
</script>
<!-- Script by hscripts.com -->
For customization of this script or any script development, contact us at support@hscripts.com
Usage
a) Copy the following Java script code into your parent page.
<input type="button" id="hide" onclick="topWindow()" value="click">
b) Just include <body onblur="self.focus()"> in child window.
c) Now the Java script function will work fine.
Note:Use the JavaScript code with in the head tag.
License
- The javascript (misspelled as java script) is given under GPL License
- i.e. Free use for those who use the codes as it is.
- Free, if your modification does not remove our copyright information and links.
- Click Here for detailed license information.
- You can purchase the script if your requirements does not meet our GPL License terms.