Skip to main content
John Neff (Ring2Media) ha fatto una domanda in #Visualforce
Hello, 

I would like to create a hyperlink on one of my VF pages where upon click a new window opens that is 500px X 500px.  This will be for a "Help topic" - but I can not seem to figure out how to force the hyperlink to open in a new window and not a new tab.  

I tried using something like this: 

<b><apex:outputLink onclick="window.open(URL,'/apex/Probability_Guide','width=500,height=500')">Prob%</apex:outputLink></b>

And the new window is opening properly, but the page displayed in the new window is just a repeat of the page where the link resides.  How do I direct the new window to open /apex/Probability_Guide?

Thanks in advance!

John

 
2 risposte
  1. 2 mag 2016, 23:15
    Here is snippet for your scenario. Let me know if you have any issues.

     

    <b><apex:commandLink reRender="button" onclick="window.open('/apex/Probability_Guide','','width=500,height=500')" id="button">Prob%</apex:commandLink></b>

    Thanks,

    pRAMODH.

     
0/9000