FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


how do i make a window/iframe in a table within php page..??





Slick
hi all

offerring 60 fri$ for this bit of code

just wondering if anyone can help please... wat i'd need to make is an iframe type operation within a php page...

basically wat i want to do is have a page with a chat room on it but above the chat room i want an embedded music player which plays a stream..

the embedded player will be in a php page also but have a script displaying how many listeners etc...

the reason i want this in an iframe is so that i can refresh the page with the player and statistics but not refresh the chatroom etc


could i create a page with a simple include tag and include the player page and then have a button that refreshes just that specific included page?

i will have another include tag so the refresh button would need to be coded so that it just refreshed the player page..

can anyone help me at all?

thanks in advance!!
jabapyth
this is a job for HTML and Javascript!
Code:
<?php

// do stuff

?>

<iframe id="miframe" src="mypage.php"></iframe>

<script type="text/javascript">
function refreshiframe()
{
document.miframe.location.href="mypage.php"
setTimeout("refreshiframe()", 10000);
}
refreshiframe()
</script>

<?php

// do other stuff

?>

this refreshes the iframe every ten seconds.
change the setTimeout("refreshiframe()",10000) to whatever you want (in miliseconds)

Good Luck!
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.