new window in visual force page

My problem is when click on link, the new window takes up the existing window.

My requirement is when click on link, the new window just pop up as tab, without taking up the exisitng window. So that user won’t feel distrubed.

<apex:outputLink value="#" onclick="return goToAnotherPage('{!studentId}');">

In JS,

window.location = '/apex/VF_AnotherPage?studentId=' + studentId;

How can I make a new window , without taking up the existing window. I need to pass Parameters too.


<apex:outputLink value="/apex/VF_AnotherPage?studentId={!studentId}" target="_blank">

The target=”_blank” will open a new window .

In javascript'/apex/VF_AnotherPage?studentId=' + studentId);

By default has name parameter as _blank.

Source : Link , Question Author : kitokid , Answer Author : Mohith Shrivastava

Leave a Comment