HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Frameset
Post new topic   Reply to topic    HTML Help Forum -> General HTML
View previous topic :: View next topic  
Author Message
sthlmkatta



Joined: 04 Nov 2009
Posts: 4

PostPosted: Wed Nov 04, 2009 11:08 am     Frameset Reply with quote

Hi!
I want to use frames at my homepage but I dont know where to put the code! I have written the code for the page and I also have the code for the frames, but since Im using the BODY-tag its not possible to use FRAMESET in the same code, isnt that right?
Shall I link to another page in my BODY that links to FRAMESET or how do I do it?
Thanks!
/ Katarina
sticks464



Joined: 31 Dec 2006
Posts: 2627

PostPosted: Wed Nov 04, 2009 11:12 am     Reply with quote

Can you post the code you have now?
sthlmkatta



Joined: 04 Nov 2009
Posts: 4

PostPosted: Wed Nov 04, 2009 11:46 am     Reply with quote

This is the code Ive written:

<HTML>
<HEAD><TITLE>Restaurang Linneduken</TITLE><META NAME="keywords" CONTENT="restaurang, skärgårdsrestaurang,
saltsjöbadsrestauranger"></HEAD>
<BODY BGCOLOR="navy">
<FONT FACE="Monotype Corsiva" SIZE="4" COLOR="white">
<CENTER><H1> Restaurang Linneduken</H1><BR></CENTER>
<FONT SIZE="4">
Välkommen till hemsidan för Restaurang Linneduken, en skärgårdsinspirerad
restaurang nära havet. Här kan du få information om restaurangen, våra menyer och
kontaktuppgifter. Om du sedan klickar dig in på "Tips" kan du hjälpa oss att uppdatera
vår meny! Tveka inte att kontakta oss vid frågor eller funderingar! <BR><BR>
<CENTER><IMG WIDTH="300" HEIGHT="250" SRC="DSC00023.JPG" BORDER="5" HSPACE=30"><BR><CENTER><BR>
<A HREF="sida2.html"TARGET="dokument">Information<BR>
<A HREF="sida3.html"TARGET="dokument">Meny<BR>
<A HREF="sida4.html"TARGET="dokument">Tips<BR>
<A HREF="sida5.html"TARGET="dokument">Kontaktuppgifter<BR>
<A HREF="sida6.html"TARGET="dokument">Hitta hit!<BR></A>
<HR ALIGN="left"NOSHADE WIDTH="100%"SIZE"30">
<CENTER>Linneduken, 2009</CENTER>
</FONT>
</BODY>


</HTML>

This is the frame-code which I have in my book:

<HTML>
<HEAD><TITLE>Ramar</TITLE></HEAD>
<FRAMESET COLS="225, *">
<FRAME SRC="url"NAME="meny">
<FRAME SRC="url"NAME="dokument">
</FRAMESET>
</HTML>

How can I put in the frame-code in my code?

Thank you!
sticks464



Joined: 31 Dec 2006
Posts: 2627

PostPosted: Wed Nov 04, 2009 12:53 pm     Reply with quote

This is an example of how the frame page should look.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Ramar</title>
</head>

<frameset cols="225, * frameborder=NO framespacing=0 border=0>
<frame src="meny.html" name="meny">
<frame src="sida.html" name="dokument">

</frameset>
<noframes><body>
</body>
</noframes>
</html>


The page you supplied the code for in your post should be broken down into two pages, one for the menu which goes on the frame named "meny", and the rest of the code on a default page that will appear in the dokument frame until a link is clicked.

meny.html
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Menu</title>
</head>
<body>
<A HREF="sida2.html" TARGET="dokument">Information<BR>
<A HREF="sida3.html" TARGET="dokument">Meny<BR>
<A HREF="sida4.html" TARGET="dokument">Tips<BR>
<A HREF="sida5.html" TARGET="dokument">Kontaktuppgifter<BR>
<A HREF="sida6.html" TARGET="dokument">Hitta hit!<BR></A>
<HR ALIGN="left" NOSHADE WIDTH="100%"SIZE"30">
</body>
</html>


sida.html
Code:
<!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>Title</title>
</head>

<BODY BGCOLOR="navy">
<FONT FACE="Monotype Corsiva" SIZE="4" COLOR="white">
<CENTER><H1> Restaurang Linneduken</H1><BR></CENTER>
<FONT SIZE="4">
Välkommen till hemsidan för Restaurang Linneduken, en skärgårdsinspirerad
restaurang nära havet. Här kan du få information om restaurangen, våra menyer och
kontaktuppgifter. Om du sedan klickar dig in på "Tips" kan du hjälpa oss att uppdatera
vår meny! Tveka inte att kontakta oss vid frågor eller funderingar! <BR><BR>
<CENTER><IMG WIDTH="300" HEIGHT="250" SRC="DSC00023.JPG" BORDER="5" HSPACE=30"><BR><CENTER><BR>
<HR ALIGN="left"NOSHADE WIDTH="100%"SIZE"30">
<CENTER>Linneduken, 2009</CENTER>
</FONT>
</BODY>
</HTML>
sthlmkatta



Joined: 04 Nov 2009
Posts: 4

PostPosted: Wed Nov 04, 2009 3:24 pm     Reply with quote

Thank you for your reply!
I divided the code and did a separate code for the frame. When I open the page in my browser, the page look just as before, even though I used the frameset code. Is there something that I missed?
Thank you again!
sticks464



Joined: 31 Dec 2006
Posts: 2627

PostPosted: Wed Nov 04, 2009 4:04 pm     Reply with quote

Did you name this page as index.html?
There was an error in my code...corrected (see below).
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Ramar</title>
</head>

<frameset cols="225, *" frameborder=NO framespacing=0 border=0>
<frame src="meny.html" name="meny">
<frame src="sida.html" name="dokument">

</frameset>
<noframes><body>
</body>
</noframes>
</html>

This bit of code
<frame src="meny.html" name="meny">
will load a file called meny.html in the left column when the index.html is rendered by the browser. At the same time this file
<frame src="sida.html" name="dokument">
is loaded in the right column or dokument frame.

On initial load there will be three files loading, the page that holds the frameset code, the menu and the content. Make sure the file names match.
sthlmkatta



Joined: 04 Nov 2009
Posts: 4

PostPosted: Thu Nov 05, 2009 6:42 am     Reply with quote

It works now, thank you so much for the help!
sticks464



Joined: 31 Dec 2006
Posts: 2627

PostPosted: Thu Nov 05, 2009 7:07 am     Reply with quote

Your welcome.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> General HTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial