开发者

Focusing a Tab after it has been reloaded via window.open?

开发者 https://www.devze.com 2023-03-06 16:17 出处:网络
In my webapp I work with new Tabs I open with wi开发者_Python百科ndow.open. Sometimes, a tab with the target-name is already open in the background and the window.open(..., \"sametarget\") only reload

In my webapp I work with new Tabs I open with wi开发者_Python百科ndow.open. Sometimes, a tab with the target-name is already open in the background and the window.open(..., "sametarget") only reloads it, which is fine - but the Tab stays in the background after reloading, which is not. Is there any way (JavaScript? window.open parameter?) to get it to the foreground after reloading? Or is this prohibited by browser security? I am trying this in IE7 / IE8.


Does window.focus() solve your problem?


EDIT

Possibly not: Possible to set tab focus in IE7 from JavaScript

0

精彩评论

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