Welcome to Dream.In.Code
Become an Expert!

Join 150,363 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,821 people online right now. Registration is fast and FREE... Join Now!




Help me with a frame/table code

 
Reply to this topicStart new topic

Help me with a frame/table code, I have troubles with the coding

Joanna
22 Mar, 2008 - 03:14 AM
Post #1

New D.I.C Head
*

Joined: 22 Mar, 2008
Posts: 4

hi there everyone! iI really need a code for frame/table.
the code i want will do this:
when you click on the link on the left side, new texts will appear on the right side, and if you didn't click on the link, you won't see the text. It's totally different from opening a new page in the same window.
i'm pretty sure
CODE
<a name>
will not work since it just take you to the place you wanna read if there's a lot of stuff.
thank you soo much!
User is offlineProfile CardPM
+Quote Post

BenignDesign
RE: Help Me With A Frame/table Code
22 Mar, 2008 - 03:50 AM
Post #2

You say "People are Dumb" like it's a bad thing.
Group Icon

Joined: 28 Sep, 2007
Posts: 1,038



Thanked: 3 times
Dream Kudos: 150
My Contributions
First off, welcome to DIC!

Second, I would recommend using CSS to get this job done.

But, if you are insistent on frames, show us some more of your code so we can help find the problem. Thanks!

This post has been edited by BenignDesign: 22 Mar, 2008 - 03:50 AM
User is online!Profile CardPM
+Quote Post

Joanna
RE: Help Me With A Frame/table Code
22 Mar, 2008 - 05:23 AM
Post #3

New D.I.C Head
*

Joined: 22 Mar, 2008
Posts: 4

QUOTE(BenignDesign @ 22 Mar, 2008 - 04:50 AM) *

First off, welcome to DIC!

Second, I would recommend using CSS to get this job done.

But, if you are insistent on frames, show us some more of your code so we can help find the problem. Thanks!


sure
so here is my code for home page
CODE

<style>
body {background-image:url(http://i98.photobucket.com/albums/l264/milinaini/bg.jpg)}
div {font: 10px verdana; color: black;}
.sm {background: url(http://i98.photobucket.com/albums/l264/milinaini/BannerSmall.gif); width:151; height:16; font: 12px verdana; font-weight: bold; color:000000; text-align: center;}
.lg {background: url(http://i98.photobucket.com/albums/l264/milinaini/BannerLarge.gif); width:699; height:29; font: 20px Verdana; font-weight: bold; color:000000; text-align: center;}
.back {width: 850; border: 1px solid black; text-align: center; background: white;}
.side {width: 151; border: 1px solid black; text-align: center; font: 10px verdana;}
.main {width: 699; text-align: center; font: 10px verdana;}
a {font: 10px verdana; color: #717171; font-weight:normal; text-decoration: none;}
a:hover {font: 10px verdana; color: #FFFFFF; font-weight:bold; text-decoration:none;}
</style>

<style type="text/css">
ul,li{list-style-image:url(http://i98.photobucket.com/albums/l264/milinaini/greybullet.jpg)}</style>


<center>
<div class=back>
<span title="Welcome to Joanna's website!  Yes, this is me in my room in Vienna. xD"><img src="http://i98.photobucket.com/albums/l264/milinaini/header.jpg"></span><table width="840">
<tr>
<td class="side" valign="top" bgcolor="#EFEFEF">
<div class="sm">
About Me
</div><br>
<a href="http://www.freewebs.com/joannali/information.htm">Info</a><br>
<a href="http://www.freewebs.com/joannali/diary.htm">Diary</a><br><br>
<div class="sm">
Photoshop
</div><br>
<a href="http://www.freewebs.com/portfoliojoanna/photosop.html">Photoshop & Me</a><br>
<a href="http://www.freewebs.com/portfoliojoanna/photosop.html">Gallery</a><br>
<a href="http://www.freewebs.com/portfoliojoanna/photosop.html">Downloads</a><br><br>
<div class="sm">
School stuff
</div><br>
<a href="http://www.freewebs.com/portfoliojoanna/photosop.html">China</a>
<br><a href="http://www.freewebs.com/rinnae/adopt.html">Austria</a>
<br><a href="http://www.freewebs.com/portfoliojoanna/photosop.html">Denmark</a>
<br><a href="http://www.freewebs.com/portfoliojoanna/photosop.html">Future plan</a>
<br><br>
<div class="sm">
Contact me
</div><br>
<a href="http://www.facebook.com/profile.php?id=600840762">Facebook</a><br>
<a href="mailto:Placidteddy_Jo@hotmail.com">MSN</a><br>
<a href="mailto:joannalishufan@yahoo.com.cn">Yahoo</a><br>
<a href="http://www.neopets.com/userlookup.phtml?user=milinalini">Neopets</a>
<br><br>
<div class="sm">
Links
</div><br>
<a href="http://www.fadfly.net/home/index.htm">Quiet World</a><br>
</td>

<td class="main" valign="top"=>
<div class="lg" align="center">
Welcome
</div>
<div align="left">
Hi there and welcome to my website. Please feel free to browse around. It isn't much now since the site only started on the 22th of Feburary, 2008.Soon there will be loads of things for you to do and see. Right now I am working on: Well, basically putting the site up.
In the mean time, if you want to contact me, please <a href="mailto:Placidteddy_Jo@hotmail.com"> write me an e-mail.</a>
<br><br>
<b>Note:</b> The list <b>Contact me</b> is in order of checking frequency. I may check one e-mail account more often than the other, if I did not reply in a week, please try another e-mail address.<br><br>
<b>!Important!:</b> The website is <b>NOT</b> finished yet. So most of the links are not available. To see which parts of the website are finished, see <u>progress</u><br><br>
</div>
<div class="lg" align="left">
Progress
</div>
<li><strike>Done with Layout</strike>
<li><strike>Fix <b>Contact me</b> link</strike>
<li><strike>Done with <b>About me</b> <u>Info</u> layout</strike>
<li><strike>Done with <b>About me</b> <u>Diary</u> layout</strike>
<li><strike>Done with <b>About me</b></strike>
<li>Done with <b>Photoshop</b>
<li>Done with <b>School Stuff</b>
</td>
</tr>
<br>
<br>
<br>
<IMG src="http://counters.freewebs.com/Members/Counters/counter.jsp?userid=31575564&name=Joanna">
</table><BR><BR><BR></td></tr></table>


here is the link if necessary
http://www.freewebs.com/joannali/
User is offlineProfile CardPM
+Quote Post

BenignDesign
RE: Help Me With A Frame/table Code
22 Mar, 2008 - 06:45 AM
Post #4

You say "People are Dumb" like it's a bad thing.
Group Icon

Joined: 28 Sep, 2007
Posts: 1,038



Thanked: 3 times
Dream Kudos: 150
My Contributions
Here is how I would do this:

First, add this to the CSS in your header:
CODE
#switches {width:120px;margin:auto;text-align:left;}
ul#switches li {padding:0px;float:left;width:120px;}


Adjust your alignment, width, float, etc, according to how you want the page to look.

Then add this to your header:
CODE
<script type="text/javascript">
function switch1(div) {
var option=['sect1','sect2','sect3','sect4'];
for(var i=0; i<option.length; i++) {
if (document.getElementById(option[i])) {
obj=document.getElementById(option[i]);
obj.style.display=(option[i]==div)? "block" : "none";
}
}
}

window.onload=function () {switch1('sect1');}
</script>


You can change the section names to something else if you want (ie, "sect1" to "intro", etc, etc...) just be sure to change the window.onload section name to whatever section you want displayed first.

Use this for your navigation links:
CODE

<ul id="switches">
<li><a class="toolbar" href="java script:void[0];" onclick="switch1('sect1');">Overview</a></li>
</ul>


Again, change the section names to whichever section you want to display when that particular link is clicked.

For your main content area, add divs with your section names - all inside your main div, like this:
CODE

<div id="main">  <!--Start main division-->

<div id="sect1">  <!--Start section-->
testing
</div>  <!--End section-->

<div id="sect2">  <!--Start next section-->
testing more
</div>  <!--End next section-->

</div>  <!--End main division-->


It's not pretty, but this will give you an idea of the final result: Click here.

Hope it helps!
User is online!Profile CardPM
+Quote Post

Joanna
RE: Help Me With A Frame/table Code
23 Mar, 2008 - 01:31 AM
Post #5

New D.I.C Head
*

Joined: 22 Mar, 2008
Posts: 4

Hey, thank you for your time!
I tried the code but it won't work..
Do you think it's because the code i already have won't let this javascript code work?
is there a code that's not javascript but will do the same thing?

thank you again for you time =D
User is offlineProfile CardPM
+Quote Post

BenignDesign
RE: Help Me With A Frame/table Code
23 Mar, 2008 - 03:25 AM
Post #6

You say "People are Dumb" like it's a bad thing.
Group Icon

Joined: 28 Sep, 2007
Posts: 1,038



Thanked: 3 times
Dream Kudos: 150
My Contributions
I am assuming you are using some sort of online editor for your code????

I notice the code you pasted doesn't include the standard formating.... such as the <html> tag, etc....

I've copied your code and added the appropriate tags.... I think the issue lies in using classes for everything rather than divs... I'll see what I can come up with.

This post has been edited by BenignDesign: 23 Mar, 2008 - 03:37 AM
User is online!Profile CardPM
+Quote Post

Joanna
RE: Help Me With A Frame/table Code
23 Mar, 2008 - 05:21 AM
Post #7

New D.I.C Head
*

Joined: 22 Mar, 2008
Posts: 4

I don't know what is an online editor but I get my domain from Freewebs, and i submit my code through webzedit(it comes with freewebs.)Is that what you mean?
here is the link to my homepage if you need it =]
http://www.freewebs.com/joannali/index.htm

thanks!!
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 01:47PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month