How make so child window always has focus unless clossed?

C

CyberBless

I have a page that opens a child window using window.open(...). How do
I make so that when that child window opens you cannot get the focus
back on the parent window unless you close the child window?

Is it even possible?
 
R

Randy Webb

CyberBless said the following on 9/8/2005 8:34 PM:
I have a page that opens a child window using window.open(...). How do
I make so that when that child window opens you cannot get the focus
back on the parent window unless you close the child window?

Is it even possible?

No.
 
C

CyberBless

makes perfect sense. Now that you've mentioned it I can see how
something like that could be abused. The parent page is a allowing the
user to choose the products that he or she wants. Once the user is
ready to check out they click a button which runs window.open(). This
child window displays all the products in the users shopping cart and
asks for address, credit card info and so on.

The problem I'm having is If the user navigates back to the parent page
and adds more items to the cart then navigates back to the child page
it does not update. I want to force the user to have to close that
child window in order to get back to the parent page. This will force
the child page containing all the shopping cart info to have to update.


Any other suggestion you may have that alleviates this problem is
welcome. I have no issue with giving you the URL of the actuall
website if you contact me via email. (e-mail address removed).


Thanks
Cyber
 
C

CyberBless

I'm not familiar with modal dialogues. Is it at all possible for you
to give me a hint on how to get started there.
 
C

CyberBless

Thanks doc. Let me play with this for a while and see how and where I
can fit it into my site.
 
R

RobG

CyberBless said:
I'm not familiar with modal dialogues. Is it at all possible for you
to give me a hint on how to get started there.

Modal dialogs are not consistently supported across various browsers, a
better way is not to use a popup at all. Tabbed browsing allows users to
open their cart in a tab and so should update it whenever they choose.

Geko browsers support 'modal', as does IE 6.

<URL:http://groups.google.com.au/group/c...6893255?q=modal&rnum=2&hl=en#c64dfc9d26893255>
 
G

Gérard Talbot

CyberBless a écrit :
I have a page that opens a child window using window.open(...). How do
I make so that when that child window opens you cannot get the focus
back on the parent window unless you close the child window?

Is it even possible?

modal in Firefox and Mozilla-based browsers:

"If set to yes, the new window is said to be modal. The user cannot
return to the main window until the modal window is closed. A typical
modal window is created by the alert() function.
The exact behavior of modal windows depends on the platform and on the
Mozilla release version.
The MSIE 6 equivalent to this feature is the showModalDialog() method."

http://developer.mozilla.org/en/docs/DOM:window.open#Window_functionality_features

You have to be careful on how you use this option as it can create
annoyance, frustrations to users.

Gérard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,058
Members
48,769
Latest member
Clifft

Latest Threads

Top