HTML Question

This is a discussion on HTML Question within the Tech Board forums, part of the Community Boards category; I'm using a frameset for my site and am loading pages in to the main inner frame (as normal) The ...

  1. #1
    Refresh
    Guest

    HTML Question

    I'm using a frameset for my site and am loading pages in to the main inner frame (as normal)

    The problem is when the user hits F5 to refresh, it goes back to the beginning page indicated in the Frameset, when I really want it to refresh the current page in the inner frame.

  2. #2
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    post your HTML code.
    EntropySink. You know you have to click it.

  3. #3
    refresh
    Guest
    frameset.aspx (important part)
    ---------------------------------
    Code:
    <frameset id="boss" rows="64,*"> 
          <frame id="banner" name="banner" src="banner.aspx" scrolling="no" noresize runat=server /> 
          <frameset id="under" cols="150,*"> 
                <frame id="contents" name="contents" src="dir.aspx" runat=server /> 
                <frame id="main" name="main" src="main.aspx" runat=server /> 
          </frameset> 
    </frameset>
    ==================

    All the inner pages' page_load I need to change the src property of the "main" frame on the frameset.aspx

    idea wise would be:
    boss.under.main.src = Session("TheCurrentPage")


    This didn't work in the frameset page (i thought it would):

    <frame id="main" name="main" src="<%Session("TheCurrentPage")%>" runat=server />

  4. #4
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    I'm not sure what your problem is, but I've never used the "runat" option. Regardless, here is the source for one of my sites... I can move anywhere and it refreshes wherever I am.

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    
    <HTML>
    <head>
    <title>Crack is for dumb kids or really smart kids with lots of money...</title>
    
    </head>
    <frameset cols="114,*" frameborder=no>
    <noframes><body>
    <p>If you are seeing this message, your browser cannot handle frames, which are contained on this page and are used to enhance the page for viewing pleasure.  Please download the latest version of your browser or download the latest version of Internet Explorer or Netscape Navigator.  This page is best viewed by Internet Explorer 5.0 with a resolution of at least 600 x 800 pixels.  You can also go to our alternate site which does not contain frames.  The address is www.bic-church.org/allegheny/montgomery  Thanks for visiting! </p>
    </body></noframes>
    
    
    <frame name="frindx" src="lnkfrm.htm"  noresize scrolling="0">
    <frame name="frhome" src="benhome.htm" >
    </frameset>
    
    
    </HTML>
    EntropySink. You know you have to click it.

  5. #5
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    I don't know, if I really understand your problem, you wanna have the same pages in the frame, if the frame was refreshed.

    It is impossible, cause the browser always reloads the frame!

    you can use this script to refresh each page:

    <a href="javascript: window.history.go(0);">Refresh</a>


    Another trick is to write a cookie, I don't know how it works with
    ASP, but I can send you a php script if you want to.

    You should write from each page the page name into the cookie

    e.g.: navigation writes nav into the cookie
    and the main page writes programming in the cookie

    when you refresh the frame, the script in the frameset should
    read the cookie and show the same pages again.

  6. #6
    Registered User
    Join Date
    Sep 2002
    Posts
    21
    Another trick is to write a cookie,
    If you're gonna use php to do that, use a session, not a cookie.
    -Srg Pepper

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Exam Question - Possible Mistake?
    By Richie T in forum C++ Programming
    Replies: 15
    Last Post: 05-08-2006, 04:44 PM
  2. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  3. Design + HTML
    By orbitz in forum C Programming
    Replies: 8
    Last Post: 11-21-2002, 06:32 AM
  4. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  5. HTML question
    By Dave18 in forum Tech Board
    Replies: 5
    Last Post: 09-27-2002, 07:36 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21