I have a page called 'mas.php' where i retrieve values from database. An IFrame is present in mas.php page. It is defined as follows:
<iframe width="523" height="234" scrolling="No"
width="500" height="145" src="mail-to.php" frameborder="0"
name="myframe" ></iframe>
Now from mail-to.php page I have to navigate to mail.php for mailing.
The sequence is:
(mas.php-->mail-to.php[iframe]--->mail.php)......
here while using the iframe in 'mas.php' page can i navigate to 'mail-to.php' by defining id in iframe?
<iframe width="523" height="234" scrolling="No"
width="500" height="145" src="mail-to.php?id=<?php echo $row['id'];?>"
frameborder="0" name="myframe" ></iframe>
Related
I want to display the youtube link stored in the database and just call the link but it can't
<div class="divideo">
<iframe width="560" height="315" src="<?php echo $link; ?>" frameborder="0" allowfullscreen></iframe>
</div>
but youtube can't connect
<div class="divideo">
<iframe width="560" height="315" src="<?php echo base_url(); ?>/path/<?php echo $link ?>" frameborder="0" allowfullscreen></iframe>
</div>
You should have to give the proper path of the video link if that link is in your server if you are using an external source then use a proper link in your src tag.
Hello so I have this code here <iframe frameborder="0" height="550" marginheight="0" marginwidth="0" scrolling="auto" src="http://example.com/signup.php" width="1000"></iframe> now I was wondering is there any way to make a php script that can choose a random iframe code and display the php script on the page for example
<iframe frameborder="0" height="550" marginheight="0" marginwidth="0" scrolling="auto" src="website1.com/signup.php" width="1000"></iframe>
<iframe frameborder="0" height="550" marginheight="0" marginwidth="0" scrolling="auto" src="website2.com/signup.php" width="1000"></iframe>
like in website 1 and 2 but have it so each time a person loads that page it switches from site 1 to site 2 and embeds the php or is that n
You could simplify this easily. Try adding the sites to an array like this:
$sites = array(
'site1.com',
'site2.com',
'site3.com',
'site4.com',
'site5.com',
'site6.com',
'site7.com'
);
Now you can use features like array_rand() to pick a random entry from the site to show in your <iframe>:
<?php
$site_to_use = array_rand($sites);
?>
<iframe frameborder="0" height="550" marginheight="0" marginwidth="0" scrolling="auto" src="<?php echo $sites[$site_to_use]; ?>/signup.php" width="1000"></iframe>
Or you could even use rand() like this:
<iframe frameborder="0" height="550" marginheight="0" marginwidth="0" scrolling="auto" src="<?php echo $sites[rand(0, (count($sites - 1)))]; ?>/signup.php" width="1000"></iframe>
That avoids the hassles of large if else or switch casestatements.
Example
I am using iFrame to display video on www.ridesharebuddy.com. I am using autoplay feature in this.
I am doing it this way.
<iframe src="//player.vimeo.com/video/82633004?title=0&byline=0&portrait=0&autoplay=1" width="500" height="320" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
But sometimes it starts even before the whole page is loaded. Can i give some delay in this to load video after 5-10 seconds?
You can append the video link after the page is loaded via jQuery.
<iframe id="vimeo_frame" src="#" width="500" height="320" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<script>
jQuery(window).load(function()
{
var vimeo_frame = jQuery('#vimeo_frame'),
vimeo_src = 'player.vimeo.com/video/82633004?title=0&byline=0&portrait=0&autoplay=1';
setTimeout(function()
{
vimeo_frame.attr('src', vimeo_src);
}, 2000);
}
</script>
Don't forget to include jQuery ;-)
I have this following code where i cannot play the player in second iframe from first iframe . Although this works fine if the link to play song is in the main page and not inside the first iframe
<script type="text/javascript">
function music(dir) {
alert(dir);
var iframe = document.getElementById("player");
iframe.src = dir;
}
</script>
<iframe src="home.php" frameborder="0" scrolling="no" width="100%" height="100%" style="background:#993333"></iframe>
<iframe id="player" src="player.php" frameborder="0" scrolling="no" width="400px" height="100px" style="background:#66FF99"></iframe>
//home.php
<a href="#" onclick="return music('player.php?item=test2')" >Song2</a>
//player.php
<object type="application/x-shockwave-flash" data="dewplayer.swf?mp3=mp3/music.mp3&autostart=1" width="200" height="20" id="dewplayer"><param name="wmode" value="transparent" />
</object>
Example:
main.php
<script type="text/javascript">
function music(dir) {
alert(dir);
var iframe = document.getElementById("player");
iframe.src = dir;
}
</script>
<iframe src="home.php" frameborder="0" scrolling="no" width="100%" height="100%" style="background:#993333"></iframe>
<iframe id="player" src="player.php" frameborder="0" scrolling="no" width="400px" height="100px" style="background:#66FF99"></iframe>
player.php
<?php if(!empty($_GET['item'])){echo '<div>item = '.$_GET['item'].'</div>';} ?>
<object type="application/x-shockwave-flash" data="dewplayer.swf?mp3=mp3/music.mp3&autostart=1" width="200" height="20" id="dewplayer"><param name="wmode" value="transparent" />
</object>
home.php
<a href="#" onclick="parent.music('player.php?item=test2')" >Song2</a>
First iframe doesn't have an ID.
Both those iframes are not part of each other's document. So if you have to change url of one from the other you have to bring in parent in the picture.
You could use the new window.postMessage API to send a message from one remote frame to it's parent, and then have the parent window proxy that make message back to the other iframe by passing that message onto the other iframe.
For documentation on this, see the Mozilla page (https://developer.mozilla.org/en-US/docs/DOM/window.postMessage)
I have a plugin where is displayed some news with a like facebook button.
I would change the width of this like in this site:
(see the right sidebar)
http://www.fanpage.it/moody-s-boccia-anche-la-germania-e-la-prima-volta-per-la-merkel/
This is my site:
http://www.clouderize.it/michele/
For my button I use this url but whatever width value I set, the button dimension not change!
How can I do ?
<iframe
src="http://www.facebook.com/widgets/like.php?href=<? the_permalink(); ?>&layout=button_count&width=450&action=like&colorscheme=light&font&show_faces=false&height=64"
scrolling="no" frameborder="0"
style="border:none;">
</iframe>
try this
#fb-bar iframe{min-height:80px !important;}
<div id="fb-bar">
<fb:like href="link"></fb:like>
</div>
Or
<div id="fb-bar">
<iframe
src="http://www.facebook.com/widgets/like.php?href=<? the_permalink(); ?>&layout=button_count&width=450&action=like&colorscheme=light&font&show_faces=false&height=64"
scrolling="no" frameborder="0"
style="border:none;">
</iframe>
</div>