Excellence WebMenu Maker
htmlship1_ad.gif (6211 字节)
HtmlShip
 
Excellence Html Compress
 
OO Picture Game
Hot Software
Wav to mp3 Software
Excellence Killer
Hot Link
Uxiu Software
WebPictures Downloader

Java menu script>Menu Make>

 

Nowadays, iframes are supported by major browser, although you have to test your code carefully to make sure it works. The code below works in the major browsers including Opera.

Here are some articles on iframes:

  1.  
  2. Iframes: Opening menu items in an iframe (JavaScript) (This page)
  3. Iframes: .

Now, instead of opening new pages in the whole of the browser, you can browse some pages in the HTML tutorial while staying on this page. The first page is already loaded to get you started. Hyperlinks, within the pages, open in the iframe.

 

<!-- The code below is the JavaScript Code in the HEAD of this document that works the drop down menu-->

<script LANGUAGE="JAVASCRIPT">

<!--//

function goToPage763(mySelect)

{

PageIndex2=mySelect.selectedIndex;

{

if

(

mySelect.options[PageIndex2].value != "none"

)

{

//this is the key code in the JavaScript to open the new page in

//the iframe:-

frames['iframe2'].location.href = mySelect.options[PageIndex2].value;

}

}

}

//-->

</script>

<form name="form763">

<p><select NAME="select763" SIZE="1" onChange="goToPage763(this.form.select763)">

<option VALUE="none" SELECTED>Select a page and go</option>

<option VALUE="anchors.htm">What's in a name - Anchors</option>

<option VALUE="background_images.htm">Background Images - Ken Ward's HTML Tutorial</option>

<option VALUE="Bold.htm">Formatting - HTML Tutorial</option>

<option VALUE="buttons.htm">Form Components - HTML Guide - Buttons, Text Area, Action, etc</option>

<option VALUE="CellProperties.htm">Aligning Table Cells</option>

<option VALUE="Comments.htm">HTML Comments</option>

<option VALUE="font.htm">The Font Tag</option>

<option VALUE="form-post.htm">Posting a form</option>

<option VALUE="forms.htm">Forms</option>

<option VALUE="FormSelect.htm">Menus in Forms</option>

</select> </p>

<p>

<!-- The code below is the code in the body of this document that writes the form-->

<IFRAME NAME="iframe2" SRC="index.html" ALIGN="top" HEIGHT="100%" WIDTH="95%" HSPACE="10" VSPACE="10" align="middle">

If you can see this, your browser does not support iframes!

</IFRAME> </p>

 

</form>

 

 

Copyright © 2002-2003 Excellence Software, Inc.All rights reserved.