File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Detect new window or new tab Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Detect new window or new tab" Watch "Detect new window or new tab" New topic

Detect new window or new tab

bprakashq bprakashs

Joined: Dec 23, 2008
Posts: 3
Hi All,

Could you please let me know how we could detect opening of new window or new Tab.

Thanks and Regards,
Brahma Prakash
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Hello "bprakash"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, you can use an "onLoad" handler in the BODY tag. The handler can perform whatever actions you deem necessary, including making AJAX calls to the server.
bprakashq bprakashs

Joined: Dec 23, 2008
Posts: 3
Hi All,

Could you please reply to me whether is there a way to Detect when we open new Tab or new Window from the existing open window(BROWSER).

Thanks for your help.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

"bprakashq bprakashs", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are disabled.

JavaRanch Sheriff

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Detect new window or new tab
It's not a secret anymore!