PDA

View Full Version : Expandable Iframe (in .php) - Help +RepX2



chrisgocrazyH
21-03-2008, 02:37 AM
Yeah heyy

I have a slite probleam im using index.php with an expandable iframe in it and it dosent seem to expand i did work when i wa susing .htm probleam is i cant use .htm is because im usign a php script


Any help (if works ill rep u)

Moved by Hitman (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks. :)

Hypertext
21-03-2008, 04:55 AM
We need to see your code, simply using php over html isn't going to stop that script from functioning, unless something wierd is happening, so we need the code.

chrisgocrazyH
21-03-2008, 05:24 AM
Im gonna post hole code k?


<html>

<head>
<script type="text/javascript">

/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["main"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigat or.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextr aHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

</script>
<title>SimplyHabbo.com | Its Just to simple!</title>

</head>

<body topmargin="0" bottommargin="0" rightmargin="0" leftmargin="0" background="http://habboring.com/goodies/webbgs/newbg.png" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">

<table border="0" cellpadding="0" cellspacing="0" width="100%" height="134">
<tr>
<td width="100%" background="imgK/bannerblank1.png" height="134" align="right" valign="top" class="banner_main" bgcolor="#6CA8AD" >

<font size="1" face="Verdana">
<span style="background-color: #0EBFE9"><br>
&nbsp;</span></font><p>

<font size="1" face="Verdana">
<span style="background-color: #0EBFE9">
<img border="0" src="imgK/font_1201419153.gif" width="223" height="24" align="left"></span></font></p>
<table border="1" width="62%" id="table4" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium">
<a href="javascript:loadintoIframe('main',%20'ruskeee.png')">
<img border="0" src="defaul1.gif" align="right"></a></td>
</tr>
</table>
</td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%" height="24">
<tr>
<td width="100%" background="imgK/subnav_bar.PNG" height="24" class="subnav" align="right">
<font color="#FFFFFF"><? include "http://shcms.freehostia.com/nav.php"; ?><b><font face="Verdana" size="1"> </font>
<font face="Verdana">
<a href="javascript:loadintoIframe('main', 'http://simplyhabbo.com/V3/jobs/contact.php')" style="text-decoration: none">
<font size="1" color="#FFFFFF">&nbsp;</font></a><font size="1"><a href="javascript:loadintoIframe('main',%20'http://simplyhabbo.com/V3/news/show_news.php')"><font color="#FFFFFF">News</font></a><u></a></u></font></font></b></font><b><font color="#FFFFFF">&nbsp;&nbsp;
</font>
</font>
</b></td>
</tr>
</table>

<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><font size="1" face="Verdana"><br /></font></td><td width="5"></td>

<td width="711" valign="top">

<table border="1" width="100%" id="table1" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium">

<table width=350 border=0 cellpadding=0 cellspacing=0 id="table3">
<tr><td background=wc_top.PNG height=5></td></tr>
<tr><td background=easter.gif height=162>

<div style="padding: 8px; width: 241px; height:159px">
<font size="2" face="Verdana" color="#FFFFFF"><SCRIPT language=javascript src="http://simplyhabbo.com/V3/news/remote_headlines.php?number=1"></SCRIPT></font>
<b>
<font size="1" face="Verdana" color="#FFFFFF">Find out the Gossip by </font><font color="#FFFFFF" face="Verdana">
<font color="#FFFFFF" size="1">
<a href="javascript:loadintoIframe('main',%20'http://simplyhabbo.com/V3/news/show_news.php')" style="text-decoration: none">
<font color="#FFFFFF">
<a style="text-decoration: none" href="javascript:loadintoIframe('main',%20'http://simplyhabbo.com/V3/news/show_news.php')">
<font color="#FFFFFF">Clicking h</font></a></font></a></font><font size="1"><a style="text-decoration: none" href="javascript:loadintoIframe('main',%20'http://simplyhabbo.com/V3/news/show_news.php')"><font color="#FFFFFF">ere!</font></a></font></font></b></td></tr>
<tr><td background=wc_bottom.PNG height=5></td></tr>
</table></td>
<td width="350" style="border-style: none; border-width: medium">


<table width=350 border=0 cellpadding=0 cellspacing=0 id="table2">
<tr><td background=imgK/lc_top.PNG height=5></td></tr>
<tr><td background=imgK/lc_mid.PNG height=162>

<div style="padding: 8px; width: 222px; align: top; height:163px">

<font size="2" face="Verdana" color="#FFFFFF">

<b>SimplyHabbo Forum<script type="text/javascript">

var xmlfile="includes/ticker.php" //path to ticker txt file on your server.

//ajax_ticker(xmlfile, divId, divClass, delay, optionalfadeornot)
new ajax_ticker(xmlfile, "ajaxticker1", "someclass", 10000, "fade")
</script></b></font><font size="1" face="Verdana" color="#FFFFFF"><p>OMG were
back! for a long time we were a forum site. But now were not!<br>
OMG WHERE'S THE FORUM, Don't worry! its still here just use the Forum Link.</p>

</font>

<font size="2" face="Verdana" color="#FFFFFF">

<p>&nbsp;</font></div>

</td></tr>
<tr><td background=imgK/lc_bottom.PNG height=5></td></tr>
</table></td>
</tr>
</table>
<font size="1" face="Verdana"><br>

</font>

<center>
<table width="705" border="0" cellpadding="0" cellspacing="0">
<tr><td height="5" background="imgK/wide_top.PNG"></td></tr>
<tr><td background="imgK/wide_mid.PNG" class=greenbox><div width="100%" style="padding: 8px;">

&nbsp;<iframe id="main" src="home.htm" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none; height:260px"></iframe></div></td></tr>
<tr><td height="5" background="imgK/wide_bot.PNG"></td></tr>
</table>



</td>
<td width="5"></td>
<td width="212" valign="top">
<center>
<div id="content" style="position: relative;" class="clearfix">
<div id="column3" class="column">
<div class="habblet-container">
<div class="ad-container">
<font face="Verdana">
<a target="_top" href="http://ad.doubleclick.net/click;h=v8/3688/0/0/*/f;164682873;0-0;0;22760146;2321-160/600;25104324/25122181/1;;~sscs=?http://www.habbo.com.au/credits">
<font size="1">
<img src="http://m1.2mdn.net/viewad/1615465/1-AU_PP_Pets_160x600.gif" alt="Click here to find out more!" border="0"></font></a><font size="1">
<noscript><a target="main" href="http://ad.doubleclick.net/jump/mcn.habbo.com.au/community;tile=2;sz=160x600;ord=[timestamp]?"

target="_blank"><img src="http://ad.doubleclick.net/ad/mcn.habbo.com.au/community;tile=2;sz=160x600;ord=[timestamp]?"

width="160" height="600" border="0" alt=""></a></noscript><!-- End ad tag -->
</font></font></div>
</div>
<font size="1" face="Verdana">
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

</font></div>
<!--[if lt IE 7]><font size="1" face="Verdana">
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
</font><![endif]--></div>
<font size="1" face="Verdana"><Br /></font></td>
</tr>
</table>
<p>
<body link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"></p>

</body></html>

chrisgocrazyH
21-03-2008, 08:26 AM
Mod please remove code as i owner Requests

Florx
21-03-2008, 09:08 AM
We will all be able to see that code when we visit the site because its just the source.

Klydo
21-03-2008, 09:24 AM
Mod please remove code as i owner Requests
Why? Whats the difference?

If someone tried to use this code their minds would frazzle from the over use of basic HTML which could of been cut right down with very simple CSS. The code is so unclean that I can barely read it...

Florx
21-03-2008, 10:17 AM
Why? Whats the difference?

If someone tried to use this code their minds would frazzle from the over use of basic HTML which could of been cut right down with very simple CSS. The code is so unclean that I can barely read it...
Tough. Get better glasses / screen.

iUnknown
21-03-2008, 10:18 AM
I believe it's very likely that some of the javascripts are clashing with your expandable iframe javascript, however, I am not an expert in this but I hope me saying this triggers an explanation and help from another user.

MrCraig
21-03-2008, 10:32 AM
:S

I dont get it why your asking for help, yet wont give us source so that we know whats clashing ;l

The table tag isnt exactly copyrighted to you is it?

And theres no php in that file at all...

Want to hide these adverts? Register an account for free!