HTML Frameset

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Hello fellow html editors, I am trying to work on Frames here

I have an understanding of:

<frameset cols="25%", 75%">

<frame src="LeftSide.html">
<frame src="RightSide.html">

</frameset>

I used for Frames, but I typed it in how the tutorials say, but for some reason it's still not working and it's breaking my index.html file.. I have the above in the index.html file, any ideas why it's not working properly??
 

KSclans

New Member
Messages
197
Reaction score
0
Points
0
Because you have this line wrong

<frameset cols="25%", 75%">

You closed the quote at the end of 25% so the 75% is not inside the quotes you need "25%, 75%" so the 75% inside it too, and you have 3 quotes also only 2 delete the extra one in middle.......


so <frameset cols="25%, 75%">
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Ooooooooooooh, thanks thanks thanks, that helped...
Edit:
Alright, I have the two frames working, how do I make so when a Link is clicked it shows it on the right side???

Is that using <iframe src="filename.html"></iframe> ??
 
Last edited:

KSclans

New Member
Messages
197
Reaction score
0
Points
0
if you want the link to open in one section of frame you need to NAME the frame
for index you need

<frameset cols="25%,75%">
<frame src="left.html" name="links">
<frame src="right.html" name="main">
</frameset>

left.html will show the links and right is the be the homepage

in the left.html use links to open html in the target section

<a href="http://forums.x10hosting.com/graphics-webdesign/rightpage2.html" target="main">

notice I put <frame src="right.html" name="main">
so the name is main and you target or to open html in main
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Thanks, that makes sense, I am going to use main.html as the right side for the results.. That was quite helpful, I almost thought I had it figured out, now I know I for a fact I do... So, I only need just a leftside.html and index.html file then?? I was thinking I need at least 3, leftside.html, main.html, and index.html..
 
Last edited:

citco

New Member
Messages
4
Reaction score
0
Points
0
Thanks, that makes sense, I am going to use main.html as the right side for the results.. That was quite helpful, I almost thought I had it figured out, now I know I for a fact I do... So, I only need just a leftside.html and index.html file then?? I was thinking I need at least 3, leftside.html, main.html, and index.html..

To cut the whole story short. Here is a simple Frameset.

1. create the html file that contains the frames. sample code below.

<frameset cols="80,*" frameborder="no" border="0" framespacing="0">
<frame src="menus.html" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
<frame src="body.html" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>


2. create the two html pages namely; menus.html to be located on the left side and body.html to be on the right side.

notice we use zero bordering and spacing to make the frames blend 'uninterruptedly' or smoothly. to see the frames clearly, you could set their bgcolor in their body tag to contrasting colors.

3. since you want to click in the left and have the page open up in the right frame, for every link in your menus.html, you have to set a target. sample code below.

<a href="bla.html" target="_mainFrame">bla</a>

thus, for a link viewed as 'bla' in the menus.html located in the leftFrame, a page will be opened in the mainFrame.

hope it helped, enjoy!
 

vol7ron

New Member
Messages
434
Reaction score
0
Points
0
What the heck are you guys talking about!?!?

FRAMES SHOULD NO LONGER BE USED

If you're even thinking about using a FRAME, look up AJAX calls. Advice should not be given to something that is almost officially deprecated
 

scottnj

Member
Messages
122
Reaction score
0
Points
16
What the heck are you guys talking about!?!?

FRAMES SHOULD NO LONGER BE USED

If you're even thinking about using a FRAME, look up AJAX calls. Advice should not be given to something that is almost officially deprecated

He has a point, frames have almost completely been phased out.

I haven't used framesets in years. However I do occasionally use IFrames.

See the HTML Code Tutorials article on "Should you use Frames?"
 
Last edited:
Top