473,326 Members | 2,148 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,326 software developers and data experts.

stay on popup page until it closed?

123 100+
How to make when a pop up is open, we are not allow to switch to primary
page until we close the popup page?

thanks.
Jan 17 '09 #1
3 1581
Dormilich
8,658 Expert Mod 8TB
this is in my opinion a great source for user annoyance. personally, I don't recommend it.
Jan 18 '09 #2
perhapscwk
123 100+
from main.html, startA function will popup a page and from popup page,
it will return a value to main.htm and alert the variable aaa.

However, we know that window.open and alert always start at the same time and hence we never capture the return from popup, so I make a
prompt to stop the startA keep running so computer have time to capture
the return values from popup.

But how to make user keep focus on popup page until it close?
otherwise, before they return value from popup, they can see the prompt
and can start the alert immediately before value(aaa) to return.

help.
thanks.

main.html
Expand|Select|Wrap|Line Numbers
  1.  
  2. function startA() {
  3.  
  4. window.open("popup.htm");
  5.  
  6. check=prompt("process?");
  7.  
  8. if (check) {
  9. alert(window.aaa);  //aaa is a variable return from popup page
  10. }
  11.  
popup.htm
Expand|Select|Wrap|Line Numbers
  1. window.opener.aaa="okok";

}
Jan 18 '09 #3
acoder
16,027 Expert Mod 8TB
To answer the original question, you could use showModalDialog (where supported) or create your own version using DHTML (a pseudo-popup). It could be done with normal pop-up windows, but it will be annoying as pointed out by Dormilich.

Your main problem can easily be solved by using a button in the parent to alert the set value.
Jan 18 '09 #4

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

Similar topics

13
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields,...
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
1
by: Robert Dickow | last post by:
I have a little bit of code in a popup window that attempts to detect when the parent window is closed or rather just jumped to another page url. the expression below is used in a popup created...
7
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
3
by: Lee David | last post by:
I'm trying to have a popup window of new changes when a person comes to my web page and something has changed. I can see the "alert" popping up, but not the page. The page would look better and...
1
by: Kalyani | last post by:
Hi, I have a page with a button.On click of this button a popup window opens.Now if this window is kept open until session timeout then login page opens in the same window. Now I want that the...
1
by: Giovanni Cobos | last post by:
Hello, I am developing a Web Page with Visual Basic .NET. I would appreciate your help with this: I have a button which call a popup, in this popup I show a dress and until this point...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.