views:

133

answers:

1

Hi all,

I want to write an application that will monitor the content of all open tabs in IE / FireFox and trigger event once particular data is displayed in the tab.

I would like to know if there is an API for IE/FF to set focus on particular TAB, so that once event is triggered I set focus on a relevant tab.

Thanks in advance

A: 

You're going to have to write an add on.

Tabs look like windows to content so you can use a regular DOM Window object to discover some info about the current tab and do some things - close(), focus(), resizeTo() etc. Problem is Firefox and other modern browser suppress or ignore some of these events due to the default popup blocking behaviour. In addition, content cannot tell how many tabs are open, or what's running in them for security reasons so there would be no way to poll them for example. Best that you can do is is call window.opener from one window to find out which other one opened it.

The only way you're going to get full level of access is by writing an add-on. Every browser has its own way of writing add ons, some of which will be easier to write than others.

locka