here is what I would really suggest, take it for what it's worth.
<html>
<head>
<title>fun with youtube</title>
<style type="text/css">
#top {
width:100%;
}
#left {
float: left;
}
#youtube {
float: left;
}
#right {
float: left;
}
#btm {
width: 100%;
}
#dummy {
display: none;
}
</style>
<script type="text/javascript">
function makeGETrequest(xUrl, sendID) {
var xmlhttp = false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
xmlhttp.open("GET", xUrl,true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
document.getElementById(sendID).innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null)
}
makeGETrequest("top_html.html", "top");
makeGETrequest("left_html.html", "left");
makeGETrequest("right_html.html", "right");
makeGETrequest("btm_html.html", "btm");
</script>
</head>
<body>
<div id="top"></div>
<div id="left"></div>
<div id="youtube"><YOUTUBE CODE HERE></div>
<div id="right"></div>
<div id="btm"></div>
<div id="dummy"></div>
</body>
</html>
- <html>
- <head>
- <title>fun with youtube</title>
- <style type="text/css">
- #top {
- width:100%;
- }
- #left {
- float: left;
- }
- #youtube {
- float: left;
- }
- #right {
- float: left;
- }
- #btm {
- width: 100%;
- }
- #dummy {
- display: none;
- }
- </style>
- <script type="text/javascript">
- function makeGETrequest(xUrl, sendID) {
- var xmlhttp = false;
- try {
- xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
- } catch (e) {
- try {
- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- } catch (E) {
- xmlhttp = false;
- }
- }
- if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
- xmlhttp = new XMLHttpRequest();
- }
- xmlhttp.open("GET", xUrl,true);
- xmlhttp.onreadystatechange=function() {
- if (xmlhttp.readyState==4) {
- document.getElementById(sendID).innerHTML = xmlhttp.responseText;
- }
- }
- xmlhttp.send(null)
- }
- makeGETrequest("top_html.html", "top");
- makeGETrequest("left_html.html", "left");
- makeGETrequest("right_html.html", "right");
- makeGETrequest("btm_html.html", "btm");
- </script>
- </head>
- <body>
- <div id="top"></div>
- <div id="left"></div>
- <div id="youtube"><YOUTUBE CODE HERE></div>
- <div id="right"></div>
- <div id="btm"></div>
- <div id="dummy"></div>
- </body>
- </html>
a couple of things to note here, I included a "dummy" div that is not displayed to the user so that you can get HTML from pages and dump it here until you want to show it somewhere, if you have no use for this, then get rid of it.
I also have 4 divs surrounding the youtube video, one for each side of it, which are updated seperatly as it is now, and will recieve whatever HTML is in top_html.html, left_html.html, right_html.html and btm_html.html respectively.
the CSS code at the top is rudimentary, and can be HUGELY improved on.
the javascript only does xmlhttp requests, thats all I have in there for now.
anyways, this is how I would do it, its prettier and nicer for the user, plus then you can say you use AJAX (since thats the buzzword of the day). this is how I would do what you want, but again, do what works best for you.