wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes window.open parent and Child Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window.open parent and Child" Watch "window.open parent and Child" New topic
Author

window.open parent and Child

Ameya Thakur
Greenhorn

Joined: Feb 12, 2004
Posts: 4
I have a smal problem in window.open()
I open a child window (pop up) through a button from my parent window.
Now i dont want to have acess to the Parent window until my child winodw is closed.ie i should not be able to work on the parent window.
Do you know any way in javascript in which we can achive this.
Its like this when we get an error message we arre not allowed to go the
parent window ....

i have a search form on the click of the button it will open an pop up
window which will perform the search now this window should be active alway
until and unless this is close it , only reason for which is the search form
is dynamic and it should not have the control over the parent window until &
unless the child winodw is close.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Welcome to JavaRanch "Kurt Cobain".
No doubt you clicked on something called the JavaRanch naming policy when you signed up. Could you please take a minute to change your display name to show a name, preferably your real name? Yes I know Kurt Cobain is a real name, but I highly doubt he is talking rfrom 6 feet under unless you are an Elvis. You can do that right here. It's all about maintaining our professional image - don't let the one-eyed moose fool you!
Eric
[ March 12, 2004: Message edited by: Eric Pascarello ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Basically you have three options....
Option 1 is to use a modal window...but that only works for IE
Option 2 is you need to put a setTimeout/setInterval code on the parent when the child is open. That timer will call a function and check to see if the child is open and check if the parent is in focus. If that is true you do window.blur() and ChildName.focus().
Option 3 which is the best. Use layers with an IFRAME, show the layer and cover the page with it, Person can not continue under the layer is hidden. This way you do not have to deal with pop up blockers and such and it will work in all modern day browsers unlike Option 1.
Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: window.open parent and Child
 
Similar Threads
submit form of child window and show the new screen in parent window.
Problem with html:errors
Tough Task
Closing multiple pop-up windows?
pass control from child page to parent page