473,385 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How we can disable parent window while popup window is open?

Hi

How we can disable parent window while popup window is open? i am using window.open() method to open new popup window. As per my requirement, showModalDialog() or showModelessDialog() is not useful in my project. Can we pass any argument in window.open() method so the purpose can be solve.

Regards,
Harman
Aug 8 '06 #1
6 50103
iam_clint
1,208 Expert 1GB
I would say no not with javascript. what do you mean disable? you can put your whole parent page in a span or div and hide the innerhtml?
Aug 8 '06 #2
Code an event listener that will handle some action like ignoring events generated by the parent window. See Quiksmode's Advanced Event Registration topic here: http://www.quirksmode.org/js/events_advanced.html.
Aug 8 '06 #3
Hi

I hope by this time u might hv got the answer but it may help others,
here is the code

in the javascript write this function
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. var popupWindow=null;
  3. function popup(){
  4. popupWindow = window.open('child_page.html', bla bla bla);
  5. }
  6.  
  7. function parent_disable() {
  8. if(popupWindow && !popupWindow.closed)
  9. popupWindow.focus();
  10. }
  11. </script>
  12.  
now in the html
[HTML]<body onclick="parent_disable();">

<input type="button" onClick="return popup();" />

</body>
[/HTML]
Happyzzzzzzzzeeee Ending........
Cheezzzzzzzzz
Jan 31 '08 #4
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

You may want to use onfocus instead of onclick.
Feb 1 '08 #5
u can use both dude.....

cheezzzz.......
Feb 1 '08 #6
acoder
16,027 Expert Mod 8TB
You can, but you could have focus without clicking and use the keys to navigate.
Feb 1 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bill S. | last post by:
Hey, I am trying to figure this out. The hyperlinks on my page open up a small popup window. I have no reason to refresh the parent page or what have you. I was living in a very happy world,...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
3
by: Bob | last post by:
I am trying to create a popup page (to act as a menu) from a parent page. When the parent page (index.jsp) calls my popup function (see below) it will properly open the correct size browser window...
2
by: Mark | last post by:
Any suggestions on how to go about generating a popup, giving the user a way of searching for something, and then taking their selection after closing the pop-up and populating the parent form with...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
5
by: Peter | last post by:
1) I have a C# web application and what I am trying to do is create a popup window from a link on the parent window 2) the popup window will have a button and when a user clicks on the button the...
2
by: Robert Degen | last post by:
Hello, I got a little problem. Seems very simple: * I want to open a popup window * Popup-window uses data from its father window. BUT a parent.window does NOT point to the real parents...
2
by: epaetz | last post by:
Is there a way to decouple the linkage between a parent and a child window? Does the parent window have any sort of a collection that holds all the children that it has spawned? I want to...
3
by: rick2910 | last post by:
Hello, I have a problem with a popup. In this popup (child) are several links. I want these links to open in A NEW parent window. Code: <a href="javascript:;"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.