iframe google map is not working - php

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.

Related

wordpress php load a simple div / block on scroll

WordPress PHP load a simple div on scroll
in my case, I need to load the map only when people scroll to it, don't need to be there or loaded all the time only if someone scroll to it is on the end of the page
this is the code
?><iframe width="100%" height="400" id="gmap_canvas" src="https://maps.google.com/maps?q=<?php echo do_shortcode( '[SLUG]' ); ?>&t=&z=11&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe><br><style>.mapouter{position:relative;text-align:right;height:400px;width:100%;}</style><?
what is the best way to load this block on the scroll ?
load 300px before getting to it.
thank you

how to disable print and download option in mozilla

** 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>

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?

Unable to type in Rich Text Editor

I want to make Selenium to type a text in a Rich Text iframe, but I can't make it to work. This is the HTML of the iframe: <iframe src="" frameborder="0" class="cke_wysiwyg_frame cke_reset" style="width: 1635px; height: 100%;" title="Rich Text Editor, question" aria-describedby="cke_94" tabindex="0" allowtransparency="true"></iframe>
My steps are:
$this->selectFrame("xpath=//*[contains (#class, 'cke_wysiwyg_frame')]");
$this->type("xpath=//*[contains (#class, 'cke_wysiwyg_frame')]", $this->contextQuestion);
The thing is, for some reason it doesn't find the element. Any help would be appreciated!

How to stop Iframe autoplay

This is my code :
<iframe frameborder="0" height="650" marginheight="0" marginwidth="0" scrolling="no" src="http://www.1malaysiatv.com.my/embed/player.php?ch=alhijrah&width=920&height=580" width="780" __idm_id__="0"></iframe>
How to make this code not play with itself . i mean autoplay=0 or autostart=false
i have done many style but cannot stop it from play
An iframe cannot play anything by itself, so you also can't tell it not to autoplay. An iframe just loads a page (the src you provide), and it is the contents inside that page that can play, like in this case the video.
try below code
<iframe frameborder="0" height="650" marginheight="0" marginwidth="0" scrolling="no" src="http://www.1malaysiatv.com.my/embed/player.php?ch=alhijrah&width=920&height=580&autoplay=false" width="780" __idm_id__="0"></iframe>

Categories