开发者

Pop-up is showing in tab on IE8 but I need it in its own window

开发者 https://www.devze.com 2023-02-22 03:17 出处:网络
I know someone else asked this recently, but I haven\'t seen an answer up 开发者_如何学Gothere yet. I have a popup music player working with a WordPress website. Getting it to work was tricky and now

I know someone else asked this recently, but I haven't seen an answer up 开发者_如何学Gothere yet. I have a popup music player working with a WordPress website. Getting it to work was tricky and now I'm told the client sees it loading as a tab instead of a new window, which he absolutely won't accept. I wonder if there is absolutely no way to make this work?

function popUp() {
    var popup=window.open('http://websitehere.com?id=somevar&more=anothervar','','width=495,height=250,scrollbars=0');
}

And here's the call, in a link:

<a href="javascript:popUp();"><img src="theimage.png"></a>

Am I doing something wrong? Is there better popup code out there? Thanks!


No. Whether window.open() opens the url in a new window or a new tab is controlled by the user's browser's preferences, and cannot be overridden.


You can put it in an object element, or an iframe, in a div tricked out to look and act like a draggable, closable 'window'. Wait'll the client finds out some setups prevent any new windows being opened via script.

0

精彩评论

暂无评论...
验证码 换一张
取 消