Window.open on Windows Phone 7

I am looking for any information or helping with the problem that I have with Mobile IE9 on Windows Phone 7 Mango; although I would agree to a resolution on Windows Phone 7 in general.

<input type="button" value="input" onclick="window.open('http://www.google.com')" /> <span onclick="window.open('http://www.google.com')">span</span> <a href="#" onclick="window.open('http://www.google.com'); return false">anchor</a> 

I am using this. http://jsfiddle.net/ag7wU/1/embedded/result/

When I select any of these items on Windows Phone 7.0 / 7.1, I go to google.com. In any other browser that I can easily find, a new window / tab is created: Chrome, Firefox 6.0, Opera 11.50, IE9, Safari, WebKit on BB OSv6, Dolphin on Android 2.3.3, Dolphin on Android 3.2 and mobile safaris on IPhone and iPad.

The only exception is Windows Phone 7. The best solution I can find is to use the anchor attribute and the href attribute, and instruct users to keep the links they want and choose "open in new tab" missed something?

+4
source share
1 answer

You should always provide a backup for environments that do not support multiple tabs and windows (or JavaScript).

You want to make sure that the browser can display the real URL when the user hovers over the link, and that the link is long, right click / copy.

You also want to save link URLs for indexers, checklists, offline archivers such as archive.org and other robots.

 <a href="http://www.google.com" onclick="return!window.open(this.href)">anchor</a> 
+3
source

Source: https://habr.com/ru/post/1369509/


All Articles