PDA

View Full Version : Hand coding question - Frames



brintonwhite
September 2nd, 2003, 06:37 PM
Hope I can post this here - I am using notepad to hand code ....

I am working to learn frames and have got off to a good start, but now I need a little advice. I wll post my page at the end of this post so you can look at the HTML. Here goes

1. How do I get the homepage to open in the right frame when the site opens (I get the site not found page)

2. If I want the links page to open in a different window, can you tell me what to do?

Thank you in advance, please note that I am a new comer to html, so can you tell me exactly where to place any new code that you tell me about.

http://www22.brinkster.com/tallpox

PS no adds on this site:)

Yeldarb
September 2nd, 2003, 06:41 PM
you upload right.html into the same directory as index.htm (make sure that it is HTML NOT HTM because you wrote HTML in your code.)

lostinbeta
September 2nd, 2003, 06:42 PM
1) http://www22.brinkster.com/tallpox/right.html does not exist and that is why you are getting a page not found error in the right frame ;)

2) <A TARGET="_blank" HREF="url">link</A> will open your link in a new window.

brintonwhite
September 2nd, 2003, 06:55 PM
Thanks guys, I now have the links page opening up in a seperate window. But I need to ask yeldarb, I don't have a right.html

What do I need to put in this html page? Thank you both.

Yeldarb
September 2nd, 2003, 06:56 PM
whatever you want to be in the right frame
(lost said this too :P)

lostinbeta
September 2nd, 2003, 07:07 PM
This is your current code


<html>
<head><title>Home</title></head>


<frameset Cols="150,*">
<frame name="left" src="left.html">
<frame name="right" src="right.html">

</frameset>







</html>


First you are missing the BODY tag...


<html>
<head><title>Home</title></head>
<body>

<frameset Cols="150,*">
<frame name="left" src="left.html">
<frame name="right" src="right.html">

</frameset>






</body>
</html>



2nd, to edit what goes in the right frame, edit the SRC attribute of the frame on the right (in this case it is the framed named "right")

brintonwhite
September 2nd, 2003, 07:19 PM
Yes I have done it now. Thanks fellows. One thing I should mention. In the book I have it tells me that the frameset tag replaces the body tag?

Yeldarb
September 2nd, 2003, 07:32 PM
it can, but it's still good practice to put it in there :)