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
GangulyGanguly 

Open a new Page in an Existing page

Hello All,

 

I am trying to open a new VF Page in the existing page in the click of a command button by calling a javascript in the on click event of the button.

The Javascript function is a very simple one with only a window.open method in it. Below is the snippet of it;

 

window.open("/apex/testPage","_self");

 

But the button click is not taking me to the testPage. If i am tring to do the same through command link, its working.

 

Any help is highly appreciated.

 

Thanks,

Kaushik

joshbirkjoshbirk

Try:

 

top.location.href = '/apex/TestPage'

 

GangulyGanguly

Thanks Josh.... But its also not working.. :(

Devendra@SFDCDevendra@SFDC

 

Hi Ganguli,

 

Try this,

 

window.open('/apex/vfPageName','_top')

 

Hope this helps.

 

Thanks,

Devendra S