Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 8: Open Link in new Tab

I have tried to achieve this in several ways, none of them work:

<a href="url" target="_blank"/>

<a href="javascript:void(0)" onclick="window.open(url)"/>

<a href="javascript:void(0)" onclick="window.open(url,'_blank')"/>

<a href="javascript:void(0)" onclick="window.open(url,'_newtab')"/>

<a href="javascript:void(0)" onclick="window.open(url,'popup','width=640,height=480')"/>

I read here that this is not possible to control programmatically on Windows Phone 7, however I need a solution for Windows Phone 8.

like image 623
最白目 Avatar asked Nov 12 '22 03:11

最白目


1 Answers

There are some minor differences between Internet Explorer 10 for Windows 8 and Internet Explorer 10 for Windows Phone that you need to be aware of. Internet Explorer 10 for Windows Phone does not support the following:

  • Cross-tab communication via script (as a result window.open opens the destination URL in the same tab)
  • Also in Internet Explorer 10 for Windows Phone, Window.open does not return a valid window object. This is because on the phone each “window” is isolated in its own sandbox.

Quote from http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/08/internet-explorer-10-brings-html5-to-windows-phone-8-in-a-big-way.aspx - open the link for the full list.

like image 78
tlk Avatar answered Nov 14 '22 21:11

tlk