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
mt0859mt0859 

Error when trying to set the URL for an iframe

Hi all,

 

I have a visual force page (with its own custom ontroller) in a managed package which tries to display an iFrame where the URL is set in the page controller

 

i.e.

<apex:iframe src="{!PropURLToDisplay}" scrolling="true" rendered="true"/>

 

 

 However, when I set the variable on the page to be, say, "www.google.com" using:

 

public string getPropURLToDisplay() { string URL = 'www.google.com'; return URL;}

 

 

 I always get the VF page erroring with the message:

 

"Page MyPackageName__www.google.com does not exist"

 

Is this a bug? Are there any ways to get around this?

 

TIA,

 

Marco 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
wesnoltewesnolte

Hey

 

Have you tried prepending 'http://'? I don't think that will fix it though. I'd log a bug just in case.  

 

Cheers,

Wes 

All Answers

wesnoltewesnolte

Hey

 

Have you tried prepending 'http://'? I don't think that will fix it though. I'd log a bug just in case.  

 

Cheers,

Wes 

This was selected as the best answer
mt0859mt0859
Many thanks, that seems to have worked