Reputation: 295
I have an iframe on a saleforce page and I need to disable mouse clicks inside the iframe. Is this possible?
here is my code
<apex:page id="peprtgdash">
<apex:form >
<iframe height="900px" id="pedash" name="pedash" src="http://www.site.com" width="100%" scrolling="false"></iframe>
</apex:form>
</apex:page>
site.com is not the actual src it's just something i put in to not have my information be out there.
Upvotes: 0
Views: 4667
Reputation: 419
You need to set div
over iframe
. So, div
goes after iframe
:
...
<iframe height="900px" id="pedash" name="pedash" src="http://example.com" width="100%" scrolling="false"></iframe>
<div id="block" style="position: absolute; top: 0; left: 0; width: 100%; height: 900px"></div>
...
Upvotes: 2
Reputation: 1889
try this:
<apex:page id="peprtgdash">
<apex:form >
<div id="wrapper" style="position: relative;">
<div id="block" style="position: absolute; top: 0; left: 0; width: 100%; height: 900px"></div>
<iframe height="900px" id="pedash" name="pedash" src="http://www.site.com" width="100%" scrolling="false"></iframe>
</div>
</apex:form>
</apex:page>
Upvotes: 2