function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vin_devvin_dev 

How to open a link in a new window in Visualforce page <apex:outputLink>

Hi All,

 

I need to open a link in a new window using <apex:outputLink>.I set target="_blank".am using Google Chrome.While I click the link,the page is opened in a new tab.But,I need to open it in a new window.Please help me to find a solution.

 

Thanks in advance.

 

 

Avidev9Avidev9
Well this behaviour are not in control of the developer and are browser dependant.
What you can do is, you can give a try to onclick JS.

Have a look here http://stackoverflow.com/questions/726761/javascript-open-in-a-new-window-not-tab
Balu_SFDCBalu_SFDC
Hi,
with OutputLink link we canot open the new window, here you need to give the Onclick and call to window.open like
<apex:outputLink onclick="window.open(your redirected page')">

Hope you understand

Thanks
Balu
vin_devvin_dev

Thanks to everyone,

 

I used the following to open a link in a new window,

 

<apex:outputLink onclick="window.open(URL,'','width=500,height=500')">Click here</apex:outputLink>

Kiran  KurellaKiran Kurella
You can also use target attribute to set the window behaviour:

<apex:outputLink value="{!url}" target="_blank">Click Here </apex:outputLink>
Sayeeda Banu 5Sayeeda Banu 5
I have added a code like Below to call One VF fromAnother

<script type="text/ng-template" id=" OK_JobStatistics_Monitoring_List_IMS.template">
       <apex:outputLink value= "{!URLFOR($Page.OK_VR_RelatedList_All_IMS)}" id="page">Click here</apex:outputlink>
    </script>

after Clicking On ClickHere button Only VF Page is getting Called. So please let me know how to call VF page without  Clicking anything Directly.
As soon as my code executes it should open VF page