Hey guys, I coded this site for my customer and the Expandable iframe isn't working, can anyone help me. Here is the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><style type="text/css">
.menutitle{
cursor:pointer;
margin-bottom: 5px;
background-color:#ECECFF;
color:#000000;
width:140px;
padding:2px;
text-align:center;
font-weight:bold;
/*/*/border:1px solid #000000;/* */
}
.submenu{
margin-bottom: 0.5em;
}
</style>
<script type="text/javascript">
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only
if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsBy TagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}
function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display ="block"
}
}
function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display= ="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}
if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunction
if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate
</script>
<title>HabboTalent ~ Where Talent comes to you!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
.style1 {
font-size: 1px;
color: #9AE53D;
}
.style3 {font-size: 5px}
body {
background-image: url(layout/bgnews.png);
}
aink {
color: #0099FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0099FF;
}
a:hover {
text-decoration: underline;
color: #6699FF;
}
a:active {
text-decoration: none;
}
a {
font-weight: bold;
}
.style4 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style></head>
<body>
<div align="center">
<table width="888" height="120" border="0" background="layout/header.png">
<tr>
<td width="580"><div align="center"></div></td>
<td width="298"><div align="center">
<table width="289" height="106" border="0" background="layout/radio_stats.png">
<tr>
<td><div align="center" class="style4">DJ Says Here - Use a iFrame </div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<table width="888" height="6" border="0" background="layout/content.png">
<tr>
<td><span class="style1">d</span></td>
</tr>
</table>
<table width="888" height="20" border="0" background="layout/djsaysbar.png">
<tr>
<td><div align="center">DJ Says Here - Use a iframe </div></td>
</tr>
</table>
<table width="888" height="100" border="0" background="layout/content.png">
<tr>
<td width="195" align="center" valign="top"><div align="center" class="style3">
<table width="191" height="20" border="0" align="center" background="layout/bars/nav_bar.png">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<img src="layout/bars/middle_bar.png" width="191" height="4" align="top">
<table width="191" border="0" background="layout/bars/content_bar.png">
<tr>
<td><div align="center">
<table width="183" border="0" align="center">
<tr>
<td width="177"><div align="center">
<div id="masterdiv">
<div align="left"><img src="layout/navigation/ht_home.png" width="177" height="20" onclick="SwitchMenu('sub1')"><span class="submenu" id="sub1">- <a href="pages/home.htm" target="content">Home</a><br>
- <a href="pages/team.htm" target="content">Meet The Team </a><br>
- <a href="pages/jobs.htm" target="content">Job Openings</a><br>
- <a href="pages/faq.htm" target="content">FAQ</a> <br>
</span> <img src="layout/navigation/ht_community.png" width="177" height="21" onclick="SwitchMenu('sub2')"><br>
<span class="submenu" id="sub2"> - <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
</span> <img src="layout/navigation/ht_radio.png" width="177" height="21" onclick="SwitchMenu('sub3')"><br>
<span class="submenu" id="sub3"> - <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
</span> <img src="layout/navigation/ht_news.png" width="177" height="21" onclick="SwitchMenu('sub4')"><br>
<span class="submenu" id="sub4"> - <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
</span> <img src="layout/navigation/ht_guides.png" width="177" height="21" onclick="SwitchMenu('sub5')"><br>
<span class="submenu" id="sub5"> - <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
</span> <img src="layout/navigation/ht_goodies.png" width="177" height="21" onclick="SwitchMenu('sub6')"><br>
<span class="submenu" id="sub6"> - <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
</span> <img src="layout/navigation/ht_forum.png" width="177" height="21" onclick="SwitchMenu('sub7')"><br>
<span class="submenu" id="sub7"> - <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
- <a href="#" target="content">Link Here</a><br>
</span> </div>
</div>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<img src="layout/bars/bottom.png" width="191" height="5" align="top"><br>
<br>
<table width="191" height="20" border="0" align="center" background="layout/bars/news_bar.png">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<img src="layout/bars/middle_bar.png" width="191" height="4" align="top">
<table width="191" border="0" background="layout/bars/content_bar.png">
<tr>
<td align="center" valign="top"><div align="center">News Here - Don't use <br>
a iFrame</div></td>
</tr>
</table>
<img src="layout/bars/bottom.png" width="191" height="5" align="top"><br>
<br>
<table width="191" height="20" border="0" align="center" background="layout/bars/djoftheweek_bar.png">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<img src="layout/bars/middle_bar.png" width="191" height="4" align="top">
<table width="191" border="0" background="layout/bars/content_bar.png">
<tr>
<td align="center" valign="top"><div align="center"><script type="text/javascript">
//<![CDATA[
window.onload = function() {
var f = document.getElementById("djoftheweek");//Sets iframe id
function resize() { //Starts resize function
var h = "";
var w = "";
if (f.contentDocument) {
h = f.contentDocument.documentElement.offsetHeight + 20 + "px";
// can't find anything for Opera and Firefox that works for the width. OffetWidth doesn't work right either.(f.contentDocument.documentElement,"").getP ropertyValue("width");
} else if (f.contentWindow) {
h = f.contentWindow.document.body.scrollHeight + 5 + "px";
} else {
return;
}
f.setAttribute("height",h);
f.parentNode.setAttribute("height",h);
}
if (window.addEventListener) {
f.onload = resize;
} else if (f.attachEvent) {
f.attachEvent("onload", resize);
} else {
return;
}
resize(); //starts resize function that was coded further up the code
}
//]]>
</script><iframe name="djoftheweek" id="djoftheweek" src="pages/djoftheweek.htm" width="100%" frameborder="0" allowtransparency="yes" scrolling="No"></iframe>
</div></td>
</tr>
</table>
<img src="layout/bars/bottom.png" width="191" height="5" align="top"></div>
<div align="center"></div></td>
<td align="center" valign="top"><div align="center"><script type="text/javascript">
//<![CDATA[
window.onload = function() {
var f = document.getElementById("content");//Sets iframe id
function resize() { //Starts resize function
var h = "";
var w = "";
if (f.contentDocument) {
h = f.contentDocument.documentElement.offsetHeight + 20 + "px";
// can't find anything for Opera and Firefox that works for the width. OffetWidth doesn't work right either.(f.contentDocument.documentElement,"").getP ropertyValue("width");
} else if (f.contentWindow) {
h = f.contentWindow.document.body.scrollHeight + 5 + "px";
} else {
return;
}
f.setAttribute("height",h);
f.parentNode.setAttribute("height",h);
}
if (window.addEventListener) {
f.onload = resize;
} else if (f.attachEvent) {
f.attachEvent("onload", resize);
} else {
return;
}
resize(); //starts resize function that was coded further up the code
}
//]]>
</script><iframe name="content" id="content" src="pages/home.htm" width="100%" frameborder="0" allowtransparency="yes" scrolling="No"></iframe>
</div></td>
<td width="195" align="center" valign="top"><div align="center" class="style3">
<table width="191" height="20" border="0" align="center" background="layout/bars/poll_bar.png">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<img src="layout/bars/middle_bar.png" width="191" height="4" align="top">
<table width="191" border="0" background="layout/bars/content_bar.png">
<tr>
<td height="14"><div align="center"><script type="text/javascript">
//<![CDATA[
window.onload = function() {
var f = document.getElementById("poll");//Sets iframe id
function resize() { //Starts resize function
var h = "";
var w = "";
if (f.contentDocument) {
h = f.contentDocument.documentElement.offsetHeight + 20 + "px";
// can't find anything for Opera and Firefox that works for the width. OffetWidth doesn't work right either.(f.contentDocument.documentElement,"").getP ropertyValue("width");
} else if (f.contentWindow) {
h = f.contentWindow.document.body.scrollHeight + 5 + "px";
} else {
return;
}
f.setAttribute("height",h);
f.parentNode.setAttribute("height",h);
}
if (window.addEventListener) {
f.onload = resize;
} else if (f.attachEvent) {
f.attachEvent("onload", resize);
} else {
return;
}
resize(); //starts resize function that was coded further up the code
}
//]]>
</script><iframe name="poll" id="poll" src="pages/poll.htm" width="100%" frameborder="0" allowtransparency="yes" scrolling="No"></iframe>
</div></td>
</tr>
</table>
<img src="layout/bars/bottom.png" width="191" height="5" align="top"><br>
<br>
<table width="191" height="20" border="0" align="center" background="layout/bars/listenerrecord_bar.png">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<img src="layout/bars/middle_bar.png" width="191" height="4" align="top">
<table width="191" border="0" background="layout/bars/content_bar.png">
<tr>
<td valign="top"><div align="center">Listener Record - Don't <br>
use a iFrame</div></td>
</tr>
</table>
<img src="layout/bars/bottom.png" width="191" height="5" align="top"><br>
<br>
<table width="191" height="20" border="0" align="center" background="layout/bars/radio_bar.png">
<tr>
<td><div align="center"></div></td>
</tr>
</table>
<img src="layout/bars/middle_bar.png" width="191" height="4" align="top">
<table width="191" border="0" background="layout/bars/content_bar.png">
<tr>
<td height="14" align="center" valign="top"><div align="center"><script type="text/javascript">
//<![CDATA[
window.onload = function() {
var f = document.getElementById("radio");//Sets iframe id
function resize() { //Starts resize function
var h = "";
var w = "";
if (f.contentDocument) {
h = f.contentDocument.documentElement.offsetHeight + 20 + "px";
// can't find anything for Opera and Firefox that works for the width. OffetWidth doesn't work right either.(f.contentDocument.documentElement,"").getP ropertyValue("width");
} else if (f.contentWindow) {
h = f.contentWindow.document.body.scrollHeight + 5 + "px";
} else {
return;
}
f.setAttribute("height",h);
f.parentNode.setAttribute("height",h);
}
if (window.addEventListener) {
f.onload = resize;
} else if (f.attachEvent) {
f.attachEvent("onload", resize);
} else {
return;
}
resize(); //starts resize function that was coded further up the code
}
//]]>
</script><iframe name="radio" id="radio" src="pages/radio.htm" width="100%" frameborder="0" allowtransparency="yes" scrolling="No"></iframe>
</div></td>
</tr>
</table>
<img src="layout/bars/bottom.png" width="191" height="5" align="top"></div></td>
</tr>
</table>
<img src="layout/bars/bottomcontent.png" width="888" height="5">
<table width="888" height="45" border="0" background="layout/bars/newbottom.png">
<tr>
<td> </td>
</tr>
</table>
</div>
</body>
</html>
+Rep for help, ty! Oh, btw guys do not steal this layout, its been copyrighted, with a site.





ink {
Reply With Quote





