Frankly, I'm not sure what I'm doing wrong. This is my code, but for some reason, the map is outputting a blank iFrame with a source URL that if I click will send me to the proper map, so the URL is being input correctly, but it's not actually being displayed on my website.
<?php $addressStr ="516 East Liberty Street, Ann Arbor, MI 48104"; ?>
<iframe width="206" height="175" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="<?php echo "http://maps.googleapis.com/maps/api/staticmap?center={$addressStr}&zoom=15&size=204x173&markers=color:orange|{$addressStr}&sensor=true&output=embed"; ?>"></iframe>
It's not an iframe. You need a standard <img> tag ?
Related
I'm trying to change the SRC of an iFrame using a URL retreived by AJAX from my backend database. I need the maps to change on click of a button.
The error showing inside the iFrame is " 404. That’s an error.
The requested URL //embed was not found on this server. That’s all we know." Which makes me think the SRC isn't being changed properly.
Any help on this would be great!
Heres my setup:
<iframe id="HTMLGmapsSRC" src="" width="300" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
var artgmaps = (imagesgmaps[index].replace(/\"/g, ""));
$('#HTMLGmapsSRC').attr('src', artgmaps);
The JSON response has added backslashes however i've read this is normal?
I Used this method for the embed data in iframe.
$location = "Address which is get from the data base".
<div id="show_map" style="display:block;">
<address class="row"><?php echo $location;?></address>
</div>
and use address tag for show map
$("address").each(function(){
var embed ="<iframe width='100%' height='350' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://maps.google.com/maps?&q="+ encodeURIComponent( $(this).text() ) +"&output=embed'></iframe>";
$(this).html(embed);
});
It will be placed within a template that returns dynamic channels
Php linking thats dynamic > http://domain.com/text.php?content=yourtext
doing so returns the text. "yourtext"
what i mean by this is "yourtext" will be added into embed codes thus being dynamic.
i am basically reconstructing a streaming sites layout.
EXAMPLE:
<iframe src="http://domain.tv/embed/video/<?php echo $yourtext ?>" frameborder="0" framespacing="0" width="100%" height="100%" /></iframe>
sorry for my poor english i will adjust it if it doesn't meet your english.
If you are trying to get yourtext from http://domain.com/text.php?content=yourtext
<iframe src="http://domain.tv/embed/video/<?= htmlspecialchars($_GET['content']) ?>" frameborder="0" framespacing="0" width="100%" height="100%" /></iframe>
I am including a Youtube video in my webpage, this is the code:
<div id="content">
<iframe class="aftermovie" width="800" height="450" src="//www.youtube.com/
embed/vjFA_UNSl9c?rel=0" frameborder="0" allowfullscreen>
</iframe>
</div>
The site is running in localhost, when I use Chrome to see the page I see the video but can't do anything, in Firefox everything runs like it is supposed to.
you need the http protocole in your src to make this work with chrome
<iframe class="aftermovie" width="800" height="450" src="http://www.youtube.com/embed/B4bb69Moff8?rel=0" frameborder="0" allowfullscreen></iframe>
Good day guys, I'm trying to learn codeigniter and I'm having a trouble displaying a php file in an iframe. Here's my code. It returns "404 Page not found"
here's my view:
<iframe class="tabContent" name="myIframe" src="<?php echo site_url('pages/view_about');? >" marginheight="8" marginwidth="8"></iframe>
then here's my controller:
function view_about(){
$this->load->view('pages/about');
}
here's how my folders are arranged
application->views->pages->about.php
application->contollers->pages.php
I would just like to add, the code I pasted above for my view is located in
application->views->templates->footer.php
the iframe is actually a part of my footer thanks
php ending tag has space between
try this..
<iframe class="tabContent" name="myIframe" src="<?php echo site_url('pages/view_about'); ?>" marginheight="8" marginwidth="8"></iframe>
Hi can you please try below code hope it will work for you.
Page 1
<iframe id="targetFrame" src="" width="100%" height="100%" scrolling="NO" frameborder="0" ></iframe>
I have a website running the following code:
<iframe class="fanbox" width="472" height="220" src="http://www.connect.facebook.com/widgets/fan.php?href=<?php echo urlencode('http://www.facebook.com/my-website-page'); ?>&width=472&colorscheme=light&show_faces=true&stream=false&header=false&height=220&css=<?php echo urlencode('http://mywebsite.com/css/fb-style.css'); ?>"></iframe>
It was working, but it's seems that facebook removed this method of getting the Fan Box. Now I receive a 404 Not Found Error: http://www.connect.facebook.com/widgets/fan.php
It was really removed/moved? How can I do this now?
You should use the Like Box here. If you just want the "Fans" images, then uncheck "stream", etc until you get what you desire. Then click "Get Code" and choose "IFrame" in the dialog box.
In your example, it would be:
<iframe src="//www.facebook.com/plugins/likebox.php?href=<?php echo urlencode('YOUR_FB_URL'); ?>&width=292&height=258&show_faces=true&colorscheme=light&stream=false&border_color&header=false&" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:258px;" allowTransparency="true"></iframe>