How do I open a new window in safari on the iPad?

UI Components for JSF
Post Reply
noraneko
Posts: 3
Joined: 09 Nov 2013, 10:38

09 Apr 2014, 12:49

Hi,
How do I open a new window in safari on the iPad?
target="_blank" is not work on iPad.
I've tried windows.open(), it worked but new window is blank, processing result has been displayed in the old window.

xhtml code is

Code: Select all

<p:commandButton id="OUTPUT_REPORT"
	value="OUTPUT REPORT" ajax="false"
	action="#{bean.outputReportAction}"
	onclick="switchTarget();">
javascript code is

Code: Select all

function switchTarget(){
	var ua = navigator.userAgent;
	if(/iPhone/.test(ua) || /iPad/.test(ua)){
		this.target = "_blank";
		// window.open() <- only open new window
	}
}
Environment:
PrimeFaces 3.4
Java7
Tomcat7

Thanks in advance!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 44 guests