Ultra fast cheap  linux and windows hosting
javascript tutorial Browse Basic JavaScript Tutorial
Browse JavaScript Script resources
Browse javascript FAQS

javascript tutorial
buy template
Home >> Tutorials >> Advanced javascript tutorials
Creating frame linking to another frame Breaking out of frames
page opens in same frame page opens in new window loading multiple frames
Forms in frames back and forward in multiple frames Popup window and frame

Creating  Inline Frames:

Inline Frames are a great implementation of the frames idea. This allows you to open complete separate pages in the middle of your writing. IE3 and above and NS7 will support iframes. But NS4 will skip the iframes.

Here's a simple example of an inline frame:

Here i have displayed two pages on one page, without the restrictions of the usual frameset. To get another page to display, write the following code,

<iframe src="frame.htm" width="100%" height="110><iframe> where src is the source file.


frameborder="0" setting the border to 0 gets rid of it, allowing the page to seamlessly integrate with your main page. Possible values are 1 (yes) and 0 (no), you cannot give it a bigger border.
marginwidth="x" adds a margin to the sides of the framed page.
marginheight="x" adds the margin to the top and bottom of the framed page.
scrolling="no" if the framed page is too big for the dimensions you've specified a scrollbar will appear. This attribute will stop this from happening.
align="right" this will affect how the text around the frame aligns itself.
hspace="x" sets a margin of white space around the frame to the sides.
vspace="x" sets a white-space margin to the top and bottom.

Multiple iframes in one page

You can have multiple iframes on the same page you can interact between them, by sending commands between them, just like normal frames. See the following example:

This is the same method of interlinking in basic frames. You simply give your iframes a name, and then add the appropriate target="name" to the link. So, the code would go something like this:

<table border=1>

<td><iframe src="links.htm" name="links></iframe></td>

<td><iframe src="intro.htm" name="right></iframe></td>



Then in links.htm add target="right" to the link. If you want to set up this effect, you will need to create a blank html file(here i have created an intro.htm file) to sit in the right iframe waiting to change you cannot leave the src empty.

Page contents: itechies.net - Learn how to use Inline Frames
javascript tutorial
javascript book
Buy this book