To see what NAME can do for us, we shall build upon our previous examples by introducing hyperlinks and loading contents using them.
Firstly, we shall make another file frames4.html. Check out its code:
<HTML> <HEAD><TITLE>Intelligent Frames</TITLE> </HEAD> <FRAMESET COLS="20%, 80%"> <FRAME SRC="menu2.html" NAME="menuframe"> <FRAME SRC="home.html" NAME="mainframe"> </FRAMESET> <NOFRAMES> There is no frame support on your browser. </NOFRAMES> </HTML>
Note: We load menu2.html in menuframe and home.html in mainframe.
Secondly, we modify the navigational menu frame by adding hyperlinks.
<HTML> <HEAD><TITLE>Menu</TITLE> </HEAD> <BODY BGCOLOR="#FFCCFF"> <A HREF="home.html" TARGET="mainframe">Homepage</A> <BR> <A HREF="lions.html" TARGET="mainframe">Lions</A> <BR> <A HREF="tigers.html" TARGET="mainframe">Tigers</A> <BR> <A HREF="bears.html" TARGET="mainframe">Bears</A> <BR> </BODY> </HTML>
Note the TARGET attribute in anchor tag that specifies the mainframe, the name of our right frame.
Thus, when a link is clicked on the navigational frame, the contents of the linked document will be displayed in mainframe. If we skip to add this attribute, the contents will be loaded in the same frame that carries the link.
Play with the file and understand how this works. Click here.
Before the iPad was formally announced by Steve Jobs on 27th January 2010, there were reliable speculations that Apple was about to launch a tablet. People called it iTablet or iSlate. [more...]