Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Nov 2010
    Location
    canada
    Posts
    131
    Thanks
    51
    Thanked 0 Times in 0 Posts

    Hide frames in Javascript

    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




    Code:
    <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) {
    
     object=document.getElementById(id);
     object.style.visibility="hidden";
     top.FrameName.rows = "100,1,*";
     }
     
     
    </script>

    just for your reference
    here is the demo part

    Code:
    <html>
    <head>
    <!-- 
       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>
    </head>
    
    <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" />
       </frameset>
       <frame name="output" id="output" />
    </frameset>
    
    </html>

    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?
    Last edited by worldtraveller; 12-09-2010 at 07:44 PM.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •