HTML (English) 15 - සාමාන්‍යපෙළ තොරතුරු හා සන්නිවේදන තාක්ෂණය

HTML (English) 15

Frames

Frames are a little different than anything else in html in that you are not writing a page in the traditional sense. What you are doing is creating a template where more than one page can sit.

Frame commands are used to break up the screen into "frames" or sections containing different parts of your pages sections.

In essence, Frame commands allow you to display more than one page at the same time, in the same browser screen.

If you want your page to be divided into two parts horizontally using FRAME commands, there would be THREE pages involved; The Frames page template that breaks up the page into "Page_A.htm", "Page_B.htm". The Frame commands that would create a page like the example above look like this:

 

 

First Frame Page

 

 

 

 

 


What the commands are doing?

FRAMESET starts any frame page. It alerts the browser that FRAMES are going here.

COLS denotes that I want columns. In this case I want two; each 50% of the screen. You can split the percentages into practically any format as long as the total=100%

Just separate the percentages by commas and get it all to add up to 100%. Split the screen 3 ways  33%,33%,34%.

FRAME SRC denotes the source of the frame. Frames read like we do, left to right. The first source offered will be hard left. is the obligatory end tag.

 

Adding rows, for example :

               PAGE_B.htm

               LONGPAGE.htm

               PAGE_A.htm

 

Here is the FRAMES program to do this

 

 

 

 

 

 

 

 

 

 

 

 

 

As FRAMES read left to right. The command says that this is a frame, then the page is broken up vertically just as before.

To get ROWS add a new command denoting ROWS. In this case 75%, 25%. What this does is break up the first column into two rows. Then by offering two SOURCES for the two sections of the first column. The first frame offered a source is always the top one. Then put in a to signify closure .

Note another command again denoting ROWS, 33%, 33%, 33%. , denoting SOURCES for those three rows in column two, then added a to end those rows and another /FRAMESET still to end..

 

Here is what the item above looks like. Please note:

DENOTING DYNAMICS OF THE FRAMES: NAMES AND TARGETS

This next explanation concerns how to control page changes (hypertext links) in frames. There are three basic methods of page changes.

Here is how we do all three!

For example a very simple frame page with only three frame cells will look something like this:

 Frame Cell One

 Frame Cell Two

 Frame Cell Three

In order to ask the computer to send data to another frame cell, the cells have to be named. Here is what the FRAMESET command will look like, with NAMES, to create the illustration above:

 

 

 

 

 

 

 

 

 

 

Now that the cells are named, you can make any hypertext link inside of them targeted. Basically, youre going to add a TARGET command to the usual that targets where it goes. Let us say this example hypertext link is in cell_a above:

 

http://www.cbs.com" TARGET="C">

 

Leaving a frames page completely

So now you can send information from any cell to any cell. The problem is youre still on the frames page--and some of the larger pages are squooshed. You want to have someone click on a frame and have the link to pop up as it is own page. Well, you have to tell it to do that. (Remember!! Default is to have the information stay in the same frame, see above).

You need to TARGET the hypertext link to be it s own page. Easy enough. Just follow the format above but make the TARGET, "_top". (Note the underline before the word "top".). It looks like this:

http://www.cbs.com" TARGET="_top">

 

What of those without frames ready browsers?

That is a problem. The browser which do not support frames will get an error code if they attempt to log into a page with frames. Either that or they will receive a blank page. That is the reason there are no frames on this main page. But there are a couple ways around that.

The NOFRAME command works by writing a basic frame page like any of the three above - But immediately following the first FRAMESET command you put in a command and write a message for people without frame-worthy browsers

Greetings Browserly-Challenged. The page you are attempting to enter has frames, and if you are reading this message--you do not have the ability to see it. I suggest you go Here for a non-frame version of this page.