mikeb
mikeb

Reputation: 727

Giving window.open popup a title

I'm trying to give the popup window in window.open a title. However i'm failing to do so. Any help or suggestions please?

function view() {
    window.open(url,"_self");           
}

Upvotes: 1

Views: 2258

Answers (1)

guysigner
guysigner

Reputation: 2922

You can change the title after opening the window.

var myWindow = window.open("", "", "width=200, height=100");
myWindow.document.writeln('<html><head><title>Your new title here</title></head>');

Upvotes: 1

Related Questions