Opening a tab in firefox using javascript

by rajesh 2009-08-06 11:21:35

You can use the following code to open a new blank/empty tab in javascript


var browser = top.document.getElementById("content");
browser.addTab("");


To open a tab with an url/website
var browser = top.document.getElementById("content");
browser.addTab("http://hiox.com");


To open a tab with an bring the focus to it
var browser = top.document.getElementById("content");
browser.selectedTab = browser.addTab("");


Tagged in:

1516
like
0
dislike
0
mail
flag

You must LOGIN to add comments