View Full Version : Hide frames in Javascript

12-09-2010, 01:54 AM
New assignment. This is the code i have below already supplied now.
not exactly correct yet but want to just get something to work from

i need to insert an embedded script element in head section of document,
purpose os to hide htmlcode and csscode frames to provide more screen space

to hide 2 frames i am to change value of rows attribute in demo frameset to "100,1,*"

id of the frameset object is demo

<title>Web Design Demo Control Buttons</title>
<link href="title.css" rel="stylesheet" type="text/css" />
<script src="demo.htm" type="text/javascript"></script>
<script type="text/javascript">

function showPreview(id,x,y) {

top.FrameName.rows = "100,1,*";


just for your reference
here is the demo part

New Perspectives on JavaScript
Tutorial 6
Case Problem 3

Web Design Demo

Filename: demo.htm
Supporting files: css.htm, html.htm, title.htm

<title>HTML Demo</title>

<frameset rows="100,210,*" id="demo" name="demo">
<frame name="title" id="title" src="title.htm" scrolling="no" />
<frameset cols="*,*">
<frame name="code1" id="code1" src="html.htm" />
<frame name="code2" id="code2" src="css.htm" />
<frame name="output" id="output" />


how does this look so far

just remember the top code is what i am working on

what should i change and add?

suggestions anyone?