Link to home
Start Free TrialLog in
Avatar of Angie111297
Angie111297

asked on

Frames: link to 'display.htm' not displ. properly

I have a frames page with 3 frames.
(left col. - all the way down) border.htm
(top row) top.htm
(2nd row) display.htm

I have name links from 'border.htm' to .jpg files be shown in
'display.htm' - and they do, but not in the frame! When the link is clicked, another window opens and shows a large size graphic.

The .jpg files were originally scanned at a very high resolution for paper reproduction; I've used P'shop to crop them, and to reduce their size. I don't know whether this has anything to do with it, though.
What do I need to do to display the .jpg files at a certain size to fit into this particular frame? (display.htm)
Avatar of Angie111297
Angie111297

ASKER

Edited text of question.
When you set up your frameset, did you name the frames?

<FRAME SRC="border.htm" NAME="left" SCROLLING=AUTO frameborder="no" border="0">


Assuming you name the frame where you want the image to display in as NAME="display",  the link would look like this:

<a href="some.jpg" target="display">click me</a>
this is the frameset:

<frameset cols="20%,*" rows="*" FRAMEBORDER=NO BORDER=0>
  <frame src="border.htm">
  <frameset rows="204,*" cols="*" FRAMEBORDER=NO BORDER=0>
    <frame src="topframe.htm" frameborder="NO" scrolling="NO">
    <frame src="display.htm">
  </frameset>
</frameset>

Originally I had a pixel size in columns, but as I added to border.htm it kept scrolling; 20% works OK.

topframe.htm is fine;
maybe, it's the images (.jpg files) that are the problem - they keep showing in a window by themselves, rather than in display.htm

this is from border.htm (clicking the name Vortex is supposed to show vortex.jpg in display.htm):

<p align="center"><a href="pics/vortex.jpg" base target="display.htm" width="357" height="*"><font face="Times New Roman, Times, serif" size="3"><b>Vortex
  </b></font></a></p>

Just looking at this again, maybe it's the align=center  ??
OK, here's your problem:
You can not address a frame by the name of the document it displays, but by its *own* name. You need to modify your frameset so that it looks like this:

<frameset ...>
  <frame src="border.htm">
  <frameset ...>
    <frame src="topframe.htm" name="my_top">
    <frame src="display.htm" name="my_display">
  </frameset>
</frameset>

Now you are able to specify the output-target using the names given above, so your link should look like this:

<a href="vortex.jpg" target="my_display">

If you use target="display.htm" instead the browser will look for a frame that has been given that particular name and find none. Thus he will open a new window - which is exactly what you have encountered.

Hope this helps!
Gniss
Gnissman
 is correct. He gave the expanded explanation after seeing your frameset.  The reason things were opening in a new window is that is the default behavior for an unspecified or invalid target.
Angie,

Unless by some miracle the above answered worked, I think (if I am understanding your problem correctly) your dilemma is as follows ... and is very brief.

You need to simply include a TARGET for each link.

You can either set the target up in the HEAD section as a "BASE TARGET="page.htm"   or  you can add the TARGET in with each link - such as  <A HREF="picture.jpg" TARGET="display.htm">Your Image</A>

That's it.  

Now, if I understood your problem, this should fix it.

Just remember the TARGET.

Gary M. Gordon

(PS:  If you'd include the URL to the web page, it would be easier to tell you exactly what you need to do.)

GOOD LUCK.
Gary: I am afraid you're making the same mistake as Angie.

Angie tried to direct the output to a certain frame using
"<a href="pics/vortex.jpg" base target="display.htm">"

and you suggest the same:
<A HREF="picture.jpg" TARGET="display.htm">

Still this won't work for the reasons mentioned in my comment above. You can't use the document's name as a target but you have to declare a name for the frame instead!
My points go to Gnissman (please tell me (again) how!!)

I made no changes to top.htm or border.htm (they have other content and displayed OK in N'scape);

I changed the following (as advised to by Gnissman):

in Frameset  (my "default.htm") I changed

<frame src="display.htm">   to
<frame scr="display.htm" name="display"">

in Border.htm I changed
<a href="vortex.jpg" target="display.htm"   to

<a href="vortex.jpg" target="display">

and it worked!!! -

except for the size of the displayed picture..
I'll post that problem as a new question, unless I can solve it myself.
Hi Angie!

In order to grant me the points you first have to reject the answer by garymgordon. Afterwards I will be able to post an answer which you can then accept.

If you have any further questions - feel free to ask!
:o)

Gniss
Angie:
I just saw your profile and really would like to talk to you outside of EE. I will tell you the reasons if you drop me a line at gnissman@gmx.de (which is just a temp. address I put up for you to reach me)

I am really looking forward to hearing from you soon!

-Gniss
Because Gneissman's answer worked for me.
ASKER CERTIFIED SOLUTION
Avatar of Gnissman
Gnissman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial