Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome-extension: Refresh popup.html to a new html page

I'm developing a chrome extension and I've got my popup.html which is a login page. I'm wondering.. how would I (on successful login) redirect to a new html page (which is loaded in the area where popup.html was?) e.g When the user clicks the extension icon, popup.html comes up in the box, on successful login that box changes to a new html page other than popup.html.

How would I do this?

like image 766
Skizit Avatar asked Feb 16 '11 12:02

Skizit


1 Answers

To permanently change a popup while it is closed:

chrome.browserAction.setPopup({popup: "new.html"});

If you want to temporary change a popup while it is still open:

window.location.href="new.html";
like image 105
serg Avatar answered Oct 24 '22 04:10

serg