You need to sign in to do that
Don't have an account?
Sravansfdc9
Javascript button to open in new tab
i am having issue on a button where my org is in classic, i want to rewrite the code so that when user clicks on this button it should open in a new tab .this is my current vf page code,how can i add the code to display in new tab
< apex: page standardController = "Contact"
sidebar = "false" >
<
apex: iframe height = "550px"
src = "{!$Setup.AWSRURL__c.URL__c}?&ContactId={!contact.id}&RequestType=0&SubmitterId={!$User.X18_Digit_User_ID__c}&Source=sf"
scrolling = "true"
id = "AWIframeCon" / >
<
/apex:page>
< apex: page standardController = "Contact"
sidebar = "false" >
<
apex: iframe height = "550px"
src = "{!$Setup.AWSRURL__c.URL__c}?&ContactId={!contact.id}&RequestType=0&SubmitterId={!$User.X18_Digit_User_ID__c}&Source=sf"
scrolling = "true"
id = "AWIframeCon" / >
<
/apex:page>
You need to use javascript functionality to invoke VF page and display's in new tab.
Snippet:
window.open('https://c.cs8.visual.force.com/apex/Mobiles?id={!Campaign.Id}','_blank');
Review below links which will help you.
https://salesforce.stackexchange.com/questions/17766/new-window-in-visual-force-page
https://stackoverflow.com/questions/46907553/visualforce-page-opening-in-new-page-i-want-it-to-open-in-new-tab-can-anyone-a
https://success.salesforce.com/answers?id=9063A000000DetRQAS
Thanks,
Vinay Kumar