samy
samy

Reputation: 1969

chrome extenstion: a html page for input

im wondering if there is a possibly to add a page to the extenstion, that i can access with a link that is store in the popup page.

i want a page that stay open in a tab, so i can add input to him from the user. even if i press other tabs, becuse the popup page get closed every time(i read there is no way to keep him open)

if there is a way to creat a page like that, is it possible to use stuff like:

chrome.extension.sendRequest(null,{},function(response){.....})

and

chrome.extension.onRequest.addListener(function (request, sender, sendRespons) {
      ........
}

and ofcourse any other of the chrome api methods.

(sorry for my english)

Upvotes: 0

Views: 81

Answers (1)

Joseph Silber
Joseph Silber

Reputation: 219938

Just use chrome.tabs.create:

chrome.tabs.create({
    'url': chrome.extension.getURL('yourPage.html')
}, function(tab) {
    // callback code goes here...
});

Read the docs: http://code.google.com/chrome/extensions/tabs.html#method-create

Upvotes: 2

Related Questions