how to disable print and download option in mozilla - php

** i have triend this but its working in chrome but not working in mozilla**please help me on this
also if there is any better way to disable this please let me know
<iframe id="iframepdf" ALLOWTRANSPARENCY="true" src="<?php echo $_SESSION[$tmp_id].'#toolbar=0&navpanes=0&statusbar=0&notoolbar=1&view=Fit;readonly=true; disableprint=true;'?>" style="width:100%;height:100%;border: 10px solid white;border-radius: 5px;"></iframe>

Related

Why did my embedded website refuse to connect?

I'm unsure as to why my embedded websites are all refusing to connect when I load a webpage I get this error "www.exaplesite.com refused to connect." if anyone could help me to fix this error it would be much appreciated.
My Code:
<div id="Container"
style="padding-bottom:56.25%; position:relative; display:block; width: 100%;">
<iframe id="ViostreamIframe" width="100%" height="1000px" src="https://www.example.com/" frameborder="0" allowfullscreen="" style="position:absolute; left: 0; margin-top: 3.4%"></iframe>
</div>
You cannot fix this from Power Apps Portal side. Most probably web site that you try to embed as an iframe doesn't allow to be embedded. You need to update X-Frame-Options on the website that you are trying to embed to allow your Power Apps Portal (if you have control over that website). You can find more Here

Twitch API - multiple streams

So, basically on my website I have multiple streams and I use jquery tabs to have them all on the same page. I embed the twitch channels from their website. Now it's a bit of a mess because it's a lot of code for basically the same embed with just a different channel name, like this:
<div class="embedly-responsive" style="position: relative;padding-bottom: 75.0000%;height: 0;overflow: hidden;">
<iframe class="embedly-embed" frameborder="0" scrolling="no" allowfullscreen src="//cdn.embedly.com/widgets/media.html?src=%2F%2Fwww-cdn.jtvnw.net%2Fswflibs%2FTwitchPlayer.swff%3Fchannel%3Dcoinlives&fv=hostname%3Dwww.twitch.tv%26start_volume%3D25%26channel%3Dcoinlive%26auto_play%3Dfalse&url=http%3A%2F%2Fwww.twitch.tv%2Fcoinlive&image=http%3A%2F%2Fstatic-cdn.jtvnw.net%2Fjtv_user_pictures%2Fcoinlive-profile_image-7c29302b755258bf-600x600.png&key=0e95bd24acbf43b38a5a3a5558035397&type=application%2Fx-shockwave-flash&schema=twitch" width="400" height="300" style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;"></iframe>
</div>
I used this approach because I don't quite understand how their API works, IDK how to use JSON. Can someone explain to me how I would make this code easier?

iframe google map is not working

I am using an iFrame to show google-map, but it is not working.
If I paste the URL into the browser, then it is showing the exact location.
I don't know why it is not working.
My HTML code:
<div><iframe src="<?php echo $uni['GoogleMapLink'];?>" width="97%" height="50%" frameborder="0" style="border:1px solid #ccc;"></iframe></div>
<?php echo $uni['GoogleMapLink'];?> is https://www.google.co.in/maps/place/Birmingham+City+University/#52.517047,-1.897309,17z/data=!3m1!4b1!4m2!3m1!1s0x4870b
The output in the browser is:
<div><iframe src="https://www.google.co.in/maps/place/Birmingham+City+University/#52.517047,-1.897309,17z/data=!3m1!4b1!4m2!3m1!1s0x4870bcf7bed14f49:0x783aa84ea9692f19" width="97%" height="50%" frameborder="0" style="border:1px solid #ccc;"></iframe></div>
You are not allowed to display that URL in an iframe. If I create a fiddle containing your code:
<div><iframe src="https://www.google.co.in/maps/place/Birmingham+City+University/#52.517047,-1.897309,17z/data=!3m1!4b1!4m2!3m1!1s0x4870b" width="97%" height="50%" frameborder="0" style="border:1px solid #ccc;"></iframe></div>
and look in the javascript console, I see:
Refused to display 'https://www.google.co.in/maps/place/Birmingham+City+University/#52.517047,-1.897309,17z/data=!3m1!4b1!4m2!3m1!1s0x4870b' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
You should look at the Embed API or use Google's tools to create a map you can put on your page.

Error iframe does not scroll in Chrome when using facebook comment?

I added an iframe facebook comment, in Firefox it scrolls, but in Chrome it does not, How do I fix it ?
<iframe src="https://www.facebook.com/plugins/comments.php?api_key=172666652872245&channel_url=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D27%23cb%3Df3a81f3cfd7ece2%26domain%3Ddevelopers.facebook.com%26origin%3Dhttps%253A%252F%252Fdevelopers.facebook.com%252Ff1b19ded3a3bee%26relation%3Dparent.parent&href=http://dongcam.vn/t84630&locale=vi_VN&numposts=10&sdk=joey&width=550"
scrolling="yes"
frameborder="0"
style="border:none; overflow-x:hidden; overflow-y:scroll; min-height: 100%; width: 470px; background: #FFF;"
allowTransparency="true">
</iframe>
You need to remove min-height:100%
here's a JS bin:
http://jsbin.com/oBITUkE/1/edit

facebook like button not working correctly

I have a problem with my facebook like button. Basically I have an ajax gallery on my page and so when the image changes I change my facebook button so that the button represents the url to the new image. But when I click share it just shares the original url even though it has changed. Here is an example:
When page loads the code for the facebook button is:
<iframe scrolling="no" frameborder="0" style="border: medium none; overflow: hidden; width: 80px; height: 21px;" allowtransparency="true" src="http://www.facebook.com/plugins/like.php?href=http://go-style.co.uk/test-gallery/&layout=button_count&show_faces=false&width=80&action=like&font=lucida+grande&colorscheme=light"></iframe>
I then use jQuery to change the code to this:
<iframe scrolling="no" frameborder="0" style="border: medium none; overflow: hidden; width: 80px; height: 21px;" allowtransparency="true" src="http://www.facebook.com/plugins/like.php?href=http%3A//go-style.co.uk/nggallery/page-7029/image/30&layout=button_count&show_faces=false&width=80&action=like&font=lucida+grande&colorscheme=light"></iframe>
Yet clicking on the new button likes the original url
Anyone know why this is happening?
Have you tried refreshing the iframe after changing it SRC?
$('#youriframe').attr("src", $('#youriframe').attr("src"));
It was a caching issue with facebook in the end!

Categories