BSanders
BSanders

Reputation: 295

How can I disable mouse clicks inside an iframe in salesforce?

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

Answers (2)

Djordje Stefanovic
Djordje Stefanovic

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

Zach Spencer
Zach Spencer

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

Related Questions