2014-03-04 47 views
0

我在saleforce頁面上有一個iframe,我需要禁用iframe中的鼠標點擊。這可能嗎?如何在salesforce中的iframe中禁用鼠標點擊?

這裏是我的代碼

<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是不實際的SRC它只是我投入到沒有我的信息是在那裏。

+0

也許頂部是一個透明的'div'? –

回答

2

試試這個:

<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> 
+0

不幸的是這不起作用。 – BSanders

+0

好的......它怎麼不起作用?這是一個證明它對我有用的jsfiddle。 http://jsfiddle.net/d59e9/ –

+0

以及我仍然能夠點擊項目,並把我帶到登錄頁面,這是我試圖禁止。 – BSanders

1

您需要設置div超過iframe。所以,div追求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> 
...