1

I am facing an issue while implmenting an Inline Visualforce Page. Its only 4 lines of code but still I haven't got it working.

Issue is, when ever I click Show 5 more » | Go to list (15) »

The page is opening in that SECTION itself. It is not opening in the Top (Parent) URL How can I fix this issue? I feel this is a bug for the <apex:relatedlist> Tag. JavaScript Has a function Window.Top.Location", but I am not able to implement this in <apex:relatedList> Tag.

Code :

<apex:page standardController="Master_Object__c">
    <apex:relatedList list="Child_Object__r" pageSize="4"/>
</apex:page>
1
  • Sagar, Can you provide me a sample code for JQuery. I am not familar with JQuery to control that LINKS. Commented Jul 22, 2014 at 10:44

4 Answers 4

1

If this page is an inline Visualforce page on a standard page layout, then it's not a bug - you're clicking in an iframe and the page is doing its thing in that iframe. You may need to create your own related list (using a pageblocksection and such) and include the JavaScript (or Apex) to ensure that the redirect changes the top URL and not just the iframe URL. Sorry - I wish it were easier to do this.

1
  • Hi All, Thanks for your support and suggestions. yeah, this is not a Bug. But do we have an solution out of the box to control the apex:relatedlist tag to open in the Parent window instead of opening in Iframe. As you all said, Now I am passing the list to the page block table and also using the JavaScript to open in an new Tab. But I would Like to know, is it possible with apex:relatedlist. Commented Jul 23, 2014 at 7:40
1

You're on the right track in that it's a target it issue, and it might even be worth filing it with support to see if this is unexpected behavior for an inline visualforce page.

Short term, I'd suggest using jQuery or another javascript library to find and change the target for the "show more" links to use the "_top" target instead of what they're using now.

-1

This is not a bug. Redirection will happen in a section (iframe) , you need to use jQuery.

-1

Try This

$j = jQuery.noConflict();
        $j(document).ready(function() {
        $j('a').attr("target","_blank");

});
1
  • 1
    You should perhaps explain why this approach might fix the issue.
    – Adrian Larson
    Commented Nov 9, 2016 at 20:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .