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
Madhura BMadhura B 

Inline Visualforce

Hi,

 

I have an inline visualforce page which displays the related lists of Contacts.

Though the related lists are appearing fine when I click on the record it opens in the frame.

Is there a way to open this in a new tab?

 

<apex:page standardController="Contact" extensions="customContact">
<style>
.activeTab { width:235px;background:url(/resource/1306399243000/tabpicture) }
.inactiveTab { background-color: lightgrey; color:black; background-image:none;size:400x400}
</style>

<apex:tabPanel switchType="client" value="{!selectedTab}" tabClass="activeTab" inactiveTabClass="inactiveTab">
 
  <apex:tab label="Improvement Initiative Std "  > 
   <apex:relatedList list="Improvement_Initiative__r" /> 
  </apex:tab>

</apex:tabPanel>
</apex:page>

 

 

Thanks 

Best Answer chosen by Madhura B
Madhura BMadhura B

I just tried with this tag and it works fine.

 

<base target="_blank" />  for new window and

<base target="_parent" /> for same window.

 

Example:

 

<apex:tab label="Activity History "  >
  <apex:relatedList list="ActivityHistories" />
  <base target="_blank" />
</apex:tab>

All Answers

Adil_SFDCAdil_SFDC

write a javascript to open in new tab 

Call the function below  in your VF Page

var open_link = window.open('','_blank');
open_link
.location="somepage.html
"
;
Madhura BMadhura B

Thanks for your reply Adil but how to call the JS function from the VF 'coz I am using only

 

<apex:tab label="Custom Object "  >
   <apex:relatedList list="Custom_Object__r" />
 </apex:tab>

 

I can't write any onclick methods in <apex:relatedList>

 

Madhura BMadhura B

I just tried with this tag and it works fine.

 

<base target="_blank" />  for new window and

<base target="_parent" /> for same window.

 

Example:

 

<apex:tab label="Activity History "  >
  <apex:relatedList list="ActivityHistories" />
  <base target="_blank" />
</apex:tab>

This was selected as the best answer