Log in

View Full Version : How do i get it to expand?



Joe!
26-11-2007, 08:47 PM
Well ive coded a layout in expandable tables, using the tutorial on www.slicingguide.com and its fine, apart from im using a damn javascript code and iframes to make it expand, its slow and annoying. Is there another way? Please help
Joe

--ss--
26-11-2007, 08:48 PM
Have no height variable on the iframe's code ;)
So it's something like:

<iframe src="main.html" name="content" WIDTH="90%" frameborder=0></iframe>

iUnknown
26-11-2007, 08:56 PM
Have no height variable on the iframe's code ;)
So it's something like:

<iframe src="main.html" name="content" WIDTH="90%" frameborder=0></iframe>

I think SS is trying to say add a height variable, something like this:


<iframe src="main.html" name="content" id="content" heigh="100%" WIDTH="90%" frameborder=0></iframe>

Oh and I also added the iframe ID as the same as name, that's what I always do just cos um.. that's what I do when making an iframe. Might be a reason why my expandable iframes work fast but I have no idea.

Joe!
26-11-2007, 08:56 PM
Nope, that doesnt make it expand :s
edit: ill try that iunknown

Joe!
26-11-2007, 08:59 PM
Nope that doesnt work iunknown :s

iUnknown
26-11-2007, 09:01 PM
In the tutorial, I don't see anywhere where you're adding the iframe in. Can you link me to the layout and I'll have a look at what you've done.

Joe!
26-11-2007, 09:03 PM
Nah it doesnt have anything about an iframe in it, but thats how i thought you would pull the pages into the main content box?

iUnknown
26-11-2007, 09:06 PM
Nah it doesnt have anything about an iframe in it, but thats how i thought you would pull the pages into the main content box?

Yes, that's probably the best way to do it, unless you want to use PHP includes and stuff..... but I think iframes is easier.

If you link me to the layout, I can see what's happening/going wrong. Is it working but going slowly, or just not working? Sorry.. wasn't quite clear..

Joe!
26-11-2007, 09:08 PM
How do i do php includes? I still need to target the link to the frame though dont i?
I'll post the souurce because the layout is secret itself :)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MistiFM.Net</title>
<style type="text/css">
<!--
body {
background-color: #E5EAF7;
}
-->
</style></head>

<body>
<center>
<table width="1025" height="100%" border="0" cellpadding="0" cellspacing="0" background="images/main_bg.png">
<tr>
<td width="5" height="394" background="images/thing2.png">&nbsp;</td>
<td width="1015" valign="top"><table width="1015" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/header_logo.png" alt="MistiFM" width="1015" height="121" /></td>
</tr>
</table>
<table width="1015" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="210" valign="top"><table width="210" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/content_header_left_new_2.png" alt="Mistifm" width="210" height="27" /></td>
</tr>
<tr>
<td><iframe name="nav" id="nav" width="190" height="220" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" src="http://www.mistifm.net/site/nav2.html"></iframe></td>
</tr>
<tr>
<td><img src="images/content_footer_left.png" alt="mistifm" width="210" height="9" /></td>
</tr>
</table>
<table width="210" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/content_header_left_new_2.png" alt="Mistifm" width="210" height="27" /></td>
</tr>
<tr>
<td><iframe name="advert" width="190" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" allowtransparency="yes" src="advert.html"></iframe></td>
</tr>
</table></td>
<td width="596" valign="top"><table width="596" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/main_content_header.png" alt="mistifm" width="596" height="27" /></td>
</tr>
<tr>
<td background="images/main_content_bg.png"><center><iframe src="home.html" width="97%" height="100%" name="homemain" id="main" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" ></iframe></center></td>
</tr>

</table></td>
<td width="209" valign="top"><table width="209" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/content_header_right_new.png" alt="Mistifm" width="209" height="27" /></td>
</tr>
<tr>
<td><center><iframe name="r_stats" width="95%" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" allowtransparency="yes" src="http://www.mistifm.net/djpanel/frontend/radio_stats.php"></iframe></center></td>
</tr>
<tr>
<td><img src="images/content_footer_right.png" alt="mistifm" width="209" height="6" /></td>
</tr>
</table>
<table width="209" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/content_header_right_new.png" alt="Mistifm" width="209" height="27" /></td>
</tr>
<tr>
<td><center><iframe name="dj_says" width="95%" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" allowtransparency="yes" src="http://www.mistifm.net/djpanel/frontend/djsays.php"></iframe></center></td>
</tr>
<tr>
<td><img src="images/content_footer_right.png" alt="mistifm" width="209" height="6" /></td>
</tr>
</table>
<table width="209" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/content_header_right_new.png" alt="Mistifm" width="209" height="27" /></td>
</tr>
<tr>
<td><center><iframe name="events" width="95%" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" allowtransparency="yes" src="events.html"></iframe></center></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="5" background="images/thing.png">&nbsp;</td>
</tr>
<tr>
<td background="images/thing2.png">&nbsp;</td>
<td valign="bottom"><img src="images/main_footer.png" alt="mistifm" width="1015" height="46" /></td>
<td background="images/thing.png">&nbsp;</td>
</tr>
</table>
</center>
</body>
</html>

iUnknown
26-11-2007, 09:13 PM
i fixed it for you but it won't fit, uploading to webspace now.

http://tech-hosts.co.uk/yourhtml

:)

Colin-Roberts
26-11-2007, 09:16 PM
use an ajax navigation i believe 010101entor posted one

Joe!
26-11-2007, 09:19 PM
Okay, cheers :)

iUnknown
26-11-2007, 09:21 PM
Okay, cheers :)

working now?

Joe!
26-11-2007, 09:25 PM
Well it expands the home page which is loaded into the main content window, but the navigation page in the iframe no longer loads?

iUnknown
26-11-2007, 09:27 PM
Well it expands the home page which is loaded into the main content window, but the navigation page in the iframe no longer loads?

Why use iframe for navigation.... Just put the navigation in the box without an iframe. Copy the html from nav.html or whatever you call it and put it in place of the nav iframe - much simpler and that way it will expand.

--ss--
26-11-2007, 09:27 PM
I think SS is trying to say add a height variable, something like this:


<iframe src="main.html" name="content" id="content" heigh="100%" WIDTH="90%" frameborder=0></iframe>Oh and I also added the iframe ID as the same as name, that's what I always do just cos um.. that's what I do when making an iframe. Might be a reason why my expandable iframes work fast but I have no idea.
The way you make something expand is by having no height variable so the div i'snt limited to how much can go inside it ;)

Joe!
26-11-2007, 09:29 PM
I dont have any divs in it ss. And the iframe is loading now iunknown, but the two other ones, that are linked with djpanel dont load :S

edit: i took your advice on the navigation part Iunknown, but the djpanel iframes which have djsays and stats on, they dont load :(

Joe!
26-11-2007, 09:39 PM
I've just got it working, thanks for all your help man :D

iUnknown
26-11-2007, 10:33 PM
No problem matey :)

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