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 7 of 7

Thread: Frames!

  1. #1
    Regular Coder DR.Wong's Avatar
    Join Date
    Jan 2005
    Posts
    360
    Thanks
    23
    Thanked 1 Time in 1 Post

    Question Frames!

    How do you Exit a page in a frame, leaving only the desired page and fullscreen?

    Here is 3 example pages, just open the index page to see what I mean.
    (files should be changed to '.htm')

    Can Fix your Chopstick!
    *Dr.Wong
    Attached Files Attached Files

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    how would u want frame 2 to be the only remainingg frame, by a link? or do want it to where frame 2 can never be viewed in a frameset? or do u want it to where once u click a link it opens in place of the frameset?

  • #3
    Regular Coder DR.Wong's Avatar
    Join Date
    Jan 2005
    Posts
    360
    Thanks
    23
    Thanked 1 Time in 1 Post
    Number 3!
    I would like it to open in place of the frame set.
    I find that for some reason, If you insert a jump menu in page 2, clicking on the Go or submit button makes page 1 Disapear!

    That is the effect I am Looking for.
    (of course the link to close page 1 must be in page 1)

    Can Fix Your Chopstick!
    *DR.Wong

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    okay u can use javascript which would be put in the page that u link to, in between the head tags
    Code:
    <script type="text/javascript">
    <!-- Begin
    if (window != top) top.location.href = location.href;
    // End -->
    </script>
    or i think if you make the target of the link _top, it should display over the frameset
    Code:
    <a href="yourlink.html" target="_top">link</a>

  • #5
    Regular Coder DR.Wong's Avatar
    Join Date
    Jan 2005
    Posts
    360
    Thanks
    23
    Thanked 1 Time in 1 Post

    Arrow Okay, almost!

    Right, your script is acting how I want it to, but in the first set of code (the longer one) page 2 closes leaving page 1 open. (wrong way around) and in the shorter one, you may only navigate to one page. Now I forgot to tell you this, but I am using the top frame as a navigation bar. Clicking a link in the top frame changes the page in the bottom frame. So, I have to be able to close the top frame and leave the bottom frame just as it is.

    (otherwise the user would navigate away from the page he/she is viewing)

    See my Problem?

    Can fix you Chopstick!
    *DR.Wong

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    okay in the page that u link to from you navigation frame which should open in the bottom frame put in this code in between its head tags, so lets say in the top frame u had a link that went to main.html that should open in the bottom frame, the beginning of your main.html page would look something like this
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
      <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <title>main.html</title>
    <script type="text/javascript">
    <!-- Begin
    if (window != top) top.location.href = location.href;
    // End -->
    </script>
    </head>
    <body>
    your content here
    </body>
    </html>
    that should make main.html breakout of the frameset and be the only page remaining

  • #7
    Regular Coder DR.Wong's Avatar
    Join Date
    Jan 2005
    Posts
    360
    Thanks
    23
    Thanked 1 Time in 1 Post

    Thumbs up

    Greeaat!

    That works wonders!

    Thank you Sooooo much!
    -DR.Wong

    Wheres the food at?


  •  

    Posting Permissions

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