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
emmadiemmadi 

hiding home page component

<div id="editLink">
<iframe src="/apex/Symc_UploadVideoLink" width="100%" frameborder="0" height="100"></iframe> </div>

<script>

document.getElementById("editLink").style.visibility='hidden';

}</script>&nbsp;

 

this is the code of the home page Custom Components I want to hide the iframe based on some condition but the code is not working any help will be greate

 
Navatar_DbSupNavatar_DbSup

Hi,


In your code there is an extra curly braces(}) just before the </script> tag which may create this issue. Try the below one:
<apex:page >
<div id="editLink">
<iframe src="/apex/Symc_UploadVideoLink" width="100%" frameborder="0" height="100"></iframe>
</div>
<script>
document.getElementById("editLink").style.visibility='hidden';
</script>&nbsp;
</apex:page>