Question Regarding Output To An IFrame

D

Douglas Pollock

I'm having problems getting an html file to display within an IFrame. I
would like to have unchanging top and left hand side information with
changes occurring within an IFrame. When I use a Select List to try to open
the html file Nike.html within the IFrame it always opens a new full size
window. Can anyone enlighten me how to direct the display to the IFrame?

The directory structure is localhost/Test01

Below are two files. localhost/Test01/Test01.htm and
localhost/Test01/Nike.html

Thanks in advance
Douglas

Test01.html
-----------------------------------------------------------
<Script Language="JavaScript">
<!-- Hide the script from old browsers --
function goto(form)
{
var index=form.select.selectedIndex
alert("In goto(form) function");
if ( form.select.options[index].value != "0" )
{
window.cframe;
location=form.select.options[index].value;
//document.write=form.select.options[index].value;
}
}
-->
</Script>

<html>
<head>
<title>Test Code</title>
</head>

<body bgcolor="#ffffcc">
<!-- Begin Top Rectangle -->
<Table border = "1" width="900">
<Tr>
<!-- Start Select List -->
<Td width="30%">
<Form NAME="form1">
<P align="center">
<Select NAME="select" SIZE="1" style="font-size: 9pt; font-family:
Arial; height: 6">
<Option selected>Manufacturers</Option>
<Option Value="Nike.html">Nike</Option>
<Option Value="http://localhost/Test01/Nike.html">Nike</Option>
</Select>
<Input type="button" name="btnCategoryGo" value="Go"
onClick="goto(this.form);" />
</P>
</Form>
</Td>
<!-- End Select List -->
</Tr>
</Table>

<!-- Begin Bottom Rectangle -->
<Table border = "1" width="900" height="70%">
<tr>
<td width="170">
</td>
<td width="730" align="left">
<!-- REST OF PAGE GOES INTO THIS TABLE COLUMN -->

<iframe name="cframe" Width= "100%" height="100%" frameborder="0"
scrolling="auto" >
</iframe>

<!-- END OF REST-OF-PAGE TABLE COLUMN -->
</td>
</tr>
</table>
<!-- End Bottom Rectangle -->
</body>
</html>
-----------------------------------------------------------

Nike.html file.
-------------------------
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<Html>
<Head>
<Title>Ace Golf Closeouts Golf Clubs</Title>
</Head>
<Body bgcolor="#ffffcc">
<Table height="33" width="98%" border="1">
<Tbody>
<Tr>
<Td align="center" bgColor="#ece9d8" height="27">
<P align="center">
<Font color="#006539"><B>Search For Nike Golf Clubs Equipment
</B></Font>
</P>
</Td>
</Tr>
</Tbody>
</Table>
<Table width="98%" border="1">
<Tr>
<Td vAlign="top" width="30%">
<Ul>
<Li>
<B>
<A href="http://localhost/test01/Bags.htm">Bags</A></B>
<Li>
<B>
<A href="http://localhost/test01/Balls.htm">Balls</A></B>
<Li>
<B>
<A href="http://localhost/test01/Clubs.htm">Clubs</A></B>
<Li>
<B>
<A href="http://localhost/test01/Glovers.htm">Gloves</A></B>
<Li>
<B>
<A href="http://localhost/test01/Shoes">Shoes</A></B>
</Ul>
</Td>
</Tr>
</Table>
</Body>
</Html>

------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top