views:

26

answers:

3

Hi all, How to get the selected tab of the browser using javascript? Thanks, Gaurav

A: 

You can't unless they're internal tabs on your page.

Lloyd
@Lloyd: Hi, actually they have given a solution in the thread http://stackoverflow.com/questions/3715956/identify-selected-tab-url-of-firefox-browser-in-javascript. but that doesn't work for me.Do you still think that it's not possible to get taburl ?
gaurav
@gaurav: It seems that the OP developed some plugin for Firefox. That is why he has access to the tabs.
Felix Kling
A: 

You can get the file name of the current tab but you can not select/switch the tab of the browser.

Sarfraz
@Sarfraz: how can I get the name?
gaurav
@gaurav: Check this out: http://befused.com/javascript/get-filename-url
Sarfraz
+2  A: 

This is not possible, cause :

1. there are browsers which do not even have tabs

2. browsers usually never let you access their tabs

Using a firefox addon you might be more successfull.

Thariama