Frames and server generated HTML

Discussion in 'HTML' started by soup_or_power@yahoo.com, Feb 7, 2007.

  1. Guest

    Hi
    I have a frameset containing two frames: left and right.
    %>
    <frameset cols="20%, 80%" >
    <frameset rows="100,200" >
    <frame src="frame1.html" name=_frame2>

    </frameset>
    <frame src="test.jsp" name=_frame1>
    </frameset>


    The left frame (frame1.html) has links to the bookmarks in the right
    frame as follows:
    <a href="#bookmark1" target="left_frame"> bookmark1 </a>
    <a href="#bookmark2" target="left_frame"> bookmark2 </a>

    The right frame displays the output of Java Code (JSP) in test.jsp
    that has all the book marks.

    Now when I click on the left frame links, I expect to see the right
    frame put the bookmark on the top of the frame. However, what I see is
    a blank left frame.

    Then I tried the following in frame1.html

    <a href="test.jsp#bookmark1" target="left_frame"> bookmark1 </a>
    <a href="test.jsp#bookmark2" target="left_frame"> bookmark2 </a>

    This calls the test.jsp script on the server. I don't want the
    test.jsp called more than once, i.e. at the time of initializing the
    frames.

    Can someone please help me figure this out?

    Thanks
     
    , Feb 7, 2007
    #1
    1. Advertising

  2. dfloss Guest

    > Hi
    > I have a frameset containing two frames: left and right.
    > %>
    > <frameset cols="20%, 80%" >
    > <frameset rows="100,200" >
    > <frame src="frame1.html" name=_frame2>
    >
    > </frameset>
    > <frame src="test.jsp" name=_frame1>
    > </frameset>
    >
    >
    > The left frame (frame1.html) has links to the bookmarks in the right
    > frame as follows:
    > <a href="#bookmark1" target="left_frame"> bookmark1 </a>
    > <a href="#bookmark2" target="left_frame"> bookmark2 </a>
    >
    > The right frame displays the output of Java Code (JSP) in test.jsp
    > that has all the book marks.
    >
    > Now when I click on the left frame links, I expect to see the right
    > frame put the bookmark on the top of the frame. However, what I see is
    > a blank left frame.
    >
    > Then I tried the following in frame1.html
    >
    > <a href="test.jsp#bookmark1" target="left_frame"> bookmark1 </a>
    > <a href="test.jsp#bookmark2" target="left_frame"> bookmark2 </a>
    >
    > This calls the test.jsp script on the server. I don't want the
    > test.jsp called more than once, i.e. at the time of initializing the
    > frames.
    >
    > Can someone please help me figure this out?
    >
    > Thanks
    >


    Your frameset should look something like this:

    <frameset cols="20%,80%">
    <frame src="frame1.html" name="frame1" scrolling="auto">
    <frame src="test.jsp" name="frame2" scrolling="auto">
    </frameset>

    Links in the left frame should look like this:
    <a href="test.jsp#bookmark1" target="frame2">bookmark1</a>
    <a href="test.jsp#bookmark2" target="frame2">bookmark2</a>

    The frame names have to be consistent for all the files, so don't mix
    "frame2" with "right_frame" & etc. "right_frame" is a lot easier to
    remember than "frame2".
     
    dfloss, Feb 7, 2007
    #2
    1. Advertising

  3. Guest

    On Feb 7, 10:30 am, dfloss <> wrote:
    > > Hi
    > > I have a frameset containing two frames: left and right.
    > > %>
    > > <frameset cols="20%, 80%" >
    > > <frameset rows="100,200" >
    > > <frame src="frame1.html" name=_frame2>

    >
    > > </frameset>
    > > <frame src="test.jsp" name=_frame1>
    > > </frameset>

    >
    > > The left frame (frame1.html) has links to the bookmarks in the right
    > > frame as follows:
    > > <a href="#bookmark1" target="left_frame"> bookmark1 </a>
    > > <a href="#bookmark2" target="left_frame"> bookmark2 </a>

    >
    > > The right frame displays the output of Java Code (JSP) in test.jsp
    > > that has all the book marks.

    >
    > > Now when I click on the left frame links, I expect to see the right
    > > frame put the bookmark on the top of the frame. However, what I see is
    > > a blank left frame.

    >
    > > Then I tried the following in frame1.html

    >
    > > <a href="test.jsp#bookmark1" target="left_frame"> bookmark1 </a>
    > > <a href="test.jsp#bookmark2" target="left_frame"> bookmark2 </a>

    >
    > > This calls the test.jsp script on the server. I don't want the
    > > test.jsp called more than once, i.e. at the time of initializing the
    > > frames.

    >
    > > Can someone please help me figure this out?

    >
    > > Thanks

    >
    > Your frameset should look something like this:
    >
    > <frameset cols="20%,80%">
    > <frame src="frame1.html" name="frame1" scrolling="auto">
    > <frame src="test.jsp" name="frame2" scrolling="auto">
    > </frameset>
    >
    > Links in the left frame should look like this:
    > <a href="test.jsp#bookmark1" target="frame2">bookmark1</a>
    > <a href="test.jsp#bookmark2" target="frame2">bookmark2</a>
    >
    > The frame names have to be consistent for all the files, so don't mix
    > "frame2" with "right_frame" & etc. "right_frame" is a lot easier to
    > remember than "frame2".- Hide quoted text -
    >
    > - Show quoted text -


    That's a typo on my part. The code is exactly the way you corrected
    it. Still no luck.
    Thanks
     
    , Feb 7, 2007
    #3
  4. J.O. Aho Guest

    wrote:
    > On Feb 7, 10:30 am, dfloss <> wrote:


    >>> Then I tried the following in frame1.html
    >>> <a href="test.jsp#bookmark1" target="left_frame"> bookmark1 </a>
    >>> <a href="test.jsp#bookmark2" target="left_frame"> bookmark2 </a>
    >>> This calls the test.jsp script on the server. I don't want the
    >>> test.jsp called more than once, i.e. at the time of initializing the
    >>> frames.


    This how it works, specially when you target from another page/frame.

    Maybe you should think of redesign your site to not use frames if anchoring
    into the page like this, think most clients won't reload the page if the links
    are in the page itself.

    Using CSS/JavaScript can make it look like if it was framed and you can also
    include AJAX if you want to load parts of the page at the time.

    --

    //Aho
     
    J.O. Aho, Feb 7, 2007
    #4
  5. Andy Dingley Guest

    On 7 Feb, 15:37, "" <>
    wrote:

    > That's a typo on my part. The code is exactly the way you corrected
    > it. Still no luck.


    That's why many respondents ignore questions that are posted snippets
    rather than URLs to the real example.
     
    Andy Dingley, Feb 7, 2007
    #5
  6. Guest

    On Feb 7, 10:50 am, "J.O. Aho" <> wrote:
    > wrote:
    > > On Feb 7, 10:30 am, dfloss <> wrote:
    > >>> Then I tried the following in frame1.html
    > >>> <a href="test.jsp#bookmark1" target="left_frame"> bookmark1 </a>
    > >>> <a href="test.jsp#bookmark2" target="left_frame"> bookmark2 </a>
    > >>> This calls the test.jsp script on the server. I don't want the
    > >>> test.jsp called more than once, i.e. at the time of initializing the
    > >>> frames.

    >
    > This how it works, specially when you target from another page/frame.
    >
    > Maybe you should think of redesign your site to not use frames if anchoring
    > into the page like this, think most clients won't reload the page if the links
    > are in the page itself.
    >
    > Using CSS/JavaScript can make it look like if it was framed and you can also
    > include AJAX if you want to load parts of the page at the time.
    >
    > --
    >
    > //Aho


    Thank you for your feedback. I gave up on frames and used the
    Javascript code here:


    http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm
     
    , Feb 7, 2007
    #6
  7. wrote:

    > Thank you for your feedback. I gave up on frames and used the
    > Javascript code here:
    >
    > http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm


    What's a <layer> ? :)

    That menu doesn't do anything spectacular in any of my browsers, with
    JavaScript On or Off. Yes, I see it floating around at the above page,
    but it doesn't work on a local page in my Windows IE6, Opera 9, Firefox
    1.5.0.9 ...

    Besides that, it's annoying. <g>
    Hardly worth the effort ... Sorry.

    --
    -bts
    -Motorcycles defy gravity; cars just suck
     
    Beauregard T. Shagnasty, Feb 7, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Kamoski
    Replies:
    1
    Views:
    7,178
  2. Powerslave2112

    From Frames to no frames?

    Powerslave2112, Jan 20, 2004, in forum: HTML
    Replies:
    2
    Views:
    637
    brucie
    Jan 20, 2004
  3. Philip
    Replies:
    3
    Views:
    1,019
    Karl Groves
    Jun 28, 2004
  4. Replies:
    1
    Views:
    1,039
    dorayme
    Feb 10, 2006
  5. Replies:
    1
    Views:
    135
Loading...

Share This Page