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

iframe newbie

I would like to display an iFrame on a custom object record page and pass a value from one of the fields to the URL.

For example I have the value abcdefg on my record, so i need to pass that to the URL

So let say the full URL should be:

I've looked at this page but it doesn't help me that much as I am an Apex and VF newbie.

How would I do this?!
Ashish DevAshish Dev
For iFrame you need to construct the "src" url in javascript and set it from javascript itself like shown below.

function setSrcIFrame() { 
   document.getElementById('myIframe').src = ""; 

<iframe id="myIframe" src="" "></iframe>
apex:iframe can be used as well.
You might also need to hide iframe until you do not change URL.
Call "setSrcIFrame" from button click after which iframe is loaded or on pageload.
I'm afriad that doesn't mean much to me. I'm a beginner unfortunately.

Is there a tutorial online somewhere maybe? I did some googling but couldn't find anything helpful