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
RAJ PADMANABHAN 8RAJ PADMANABHAN 8 

Invoke External URL using Visualforce page

I have created a page with the following code:

<apex:page sidebar="false" >
    <apex:iframe height="300" width="300" src="http://www.yahoo.com" scrolling="true"/>
</apex:page>

objective is display the yahoo.com in a window .  when i preview in the code, I get a blank window.  Can someone tell me why?  Is there a way to use the URLFOR function to invoke the external website URL?
Prabhat Kumar12Prabhat Kumar12
Hi Raj,

You are not able to display your requested URL in VF page becase of security.

If you want to see the page there would be a little icon on top of the browser near address bar, disable it to load the page.

The other proble could be  Clickjack protection for Non-Setup Salesforce Pages.

For more info you can visit following site.
http://docs.releasenotes.salesforce.com/en-us/winter14/release-notes/rn_186_forcecom_cruc_setup_pages.htm


You can disable clickjack protection by calling to salesforce Support and then you will be able to display the page in VF page.
RAJ PADMANABHAN 8RAJ PADMANABHAN 8
I tried changing the code to display the same using the following:

 <apex:page action="{! urlFor('http://www.yahoo.com') }" />

but the behavior is the same.  I guess I will try the disabling the clickjack protection.  Not sure what other option is left if we need to pop up  an external app or site from the footer of the serviceconsole.  The options are to use custom console component which is of type "visualforce Page" or "Canvass App".