开发者

Open URL from a Windows app in the active browser tab

I am trying to open a URL in the active browser tab (no new window or tab should be created). I'm able to do this with IE by creating its object and then using the IE.navigate2() function but I want to know whether it can be d开发者_如何学JAVAone in a generic way, for all browsers. If not, how should I go about it?


To be honest, I wouldn't do it at all. You're making an assumption that the task your app is performing is more important than what the user is already doing. What if the user is, for example, filling out an online tax return? If your app then launches a page in the existing browser window, they would lose any work they had done.

Also, what happens if the user doesn't have a browser open in the first place? You're going to have to create a new window in that instance, so why not in all other instances?

The golden rule, in my opinion, is NEVER to hijack anything to user is already doing in an application - there is always another way to do it that won't annoy the user anything like as much.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜