• 18-10-2022, 09:39:31
    #1
    Merhaba,
    IFRAME içerisinde farklı index dosyası tam sayfa olarak yer alıyor. Üzerinde sağ tık engellemek için ne yapabiliriz?

    <iframe src="https://xxx.com/index.html" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
    </iframe>
  • 18-10-2022, 09:48:12
    #2
    .frame {
    user-select: none;
    }

    CSS en kolayı olabilir. Google bile bunu kullanıyor
  • 18-10-2022, 09:53:45
    #3
    betabil adlı üyeden alıntı: mesajı görüntüle
    .frame {
    user-select: none;
    }

    CSS en kolayı olabilir. Google bile bunu kullanıyor
    Denedim maalesef çalışmıyor, iframe içerisi tam sayfa olduğu için sanırım. Şu şekilde çektiriyorum:
    <iframe src="https://xxx.com/index.html" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
    </iframe>
  • 18-10-2022, 09:56:12
    #4
    <iframe src="https://xxx.com/index.html" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999; user-select: none">
    </iframe>
    arkadaş bunu demek istemiş sana.
  • 18-10-2022, 10:01:10
    #5
    Castaway adlı üyeden alıntı: mesajı görüntüle
    <iframe src="https://xxx.com/index.html" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999; user-select: none">
    </iframe>
    arkadaş bunu demek istemiş sana.
    Denedim çalışmıyor sağ tık engellemiyor maalesef.
  • 18-10-2022, 10:02:23
    #6
    ulus82 adlı üyeden alıntı: mesajı görüntüle
    Denedim çalışmıyor sağ tık engellemiyor maalesef.
    https://stackoverflow.com/questions/...lick-on-iframe
    Belki yardımı dokunur.
  • 18-10-2022, 10:15:56
    #7
    <html>
    <head>
    <title>Disable Context Menu</title>
    <script type="text/jscript">  function disableContextMenu()  {    window.frames["fraDisabled"].document.oncontextmenu = function(){alert("No way!"); return false;};       // Or use this    // document.getElementById("fraDisabled").contentWindow.document.oncontextmenu = function(){alert("No way!"); return false;};;      }  </script>
    </head>
    <body bgcolor="#FFFFFF" onload="disableContextMenu();" oncontextmenu="return false">
    <iframe id="fraDisabled" width="528" height="473" src="local_file.html"></iframe>
    <div style="width:528px;height:473px;background-color:transparent;position:absolute;top:0px;">
    </body>
    </html>
    Alıntıdır.
  • 18-10-2022, 10:50:23
    #8
    Maalesef o da çalışmadı
  • 18-10-2022, 12:46:05
    #9
    bilgilerim eskimiş bu konuda ... cors u unutmuşum. görünüşe göre bunu direkt yapamıyormuşsun. tıklanmasına gerek yoksa, üzerine div çekip kapatabilirsin, bu durumda bütüm etkileşim de gidecektir iframe ile. eğer kritik bir konu ise php ile veriyi alıp, eğer js, css, img dosyalarında full url yoksa ekleme yoluna gidebilirsin ki o da çok basit olmayacaktır kolay gelsin.