Frames and server generated HTML

S

soup_or_power

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
 
D

dfloss

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".
 
S

soup_or_power

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
 
J

J.O. Aho

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.
 
A

Andy Dingley

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.
 
S

soup_or_power

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.

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


http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm
 
B

Beauregard T. Shagnasty

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top