Hello I have a visualforce page integrated into opportunity layout. on button click it should redirect to another page. but the problem is on button click the page is redirecting with in layout but not whole.
-
use target="Blank" with button.– ReshmaNov 11, 2016 at 10:07
-
@Reshma nope, that wont work.– SrujanNov 11, 2016 at 10:11
2 Answers
If your button is a javascript button the following should work
window.top.location.href = "http://www.example.com";
target="Blank" - this attribute is not available with commandbutton.
You can use a commandLink to redirect to another page and style it as a command button to do the trick like
<apex:commandlink styleClass="btn" target="_blank">