Click hyperlink and put image into layer

K

KP

Hello,

I'm lookin for a simple script that will load an image into a layer
when a hypelink is clicked.

Example:

1)Hyperlink#1 in "Left.html" is clicked, image#1 found in "Image.html"
should be loaded into a layer found in "Body.html".

2)Hyperlink#2 in "left.html" is clicked, image#2 found in "Image.html"
should be loaded into the *same* layer found in "Body.html".

All images in "Image.html" have anchor tags around them that uniquely
identifies each one.

Any help would be greatly appreciated,

KP
(e-mail address removed)
 
I

Ivo

1)Hyperlink#1 in "Left.html" is clicked, image#1 found in "Image.html"
should be loaded into a layer found in "Body.html".

2)Hyperlink#2 in "left.html" is clicked, image#2 found in "Image.html"
should be loaded into the *same* layer found in "Body.html".

All images in "Image.html" have anchor tags around them that uniquely
identifies each one.

After reading your post three times, I assume you 're talking about frames.
Layers as such have only been supported up to NS4.8 iirc.
I see a document called Left.html in a small frame on the left side, and a
file called Image.html in the remaining area. The left frame is called Left;
let 's call the main frame Main. This frameset is specified in a file called
Body.html - am I right so far? To rule out confusion, can I see a live url?

If you are confident about the anhors in Image.html, an image like
<a name="XYZ" etc.><img src=etc...></a>
would be referenced with a link in Left.html like
<a href="Image.html#XYZ" target="Main">Ex why zed</a>
Many sites work this way and have done so from the moment frames were
invented. You may be interested in some online reading, look for "html
tutorial" or "tag reference". http://www.htmlhelp.com/ is a good start.


Habits are hard to change, and it is not well known, but newer browsers map
those hashed addresses to every id'ed element on a page instead of anchors
with names. This means you only need
<img id="XYZ" src=etc...>
if you are willing to accept only version 5+ browsers will understand your
idea. If this for the internet, this is perhaps 99% of your audience.

By the way, no javascript involved here. Shouldn't this be in a different
newsgroup?
Ivo
 
K

KP

Ivo said:
After reading your post three times, I assume you 're talking about frames.
Layers as such have only been supported up to NS4.8 iirc.
I see a document called Left.html in a small frame on the left side, and a
file called Image.html in the remaining area. The left frame is called Left;
let 's call the main frame Main. This frameset is specified in a file called
Body.html - am I right so far? To rule out confusion, can I see a live url?

If you are confident about the anhors in Image.html, an image like
<a name="XYZ" etc.><img src=etc...></a>
would be referenced with a link in Left.html like
<a href="Image.html#XYZ" target="Main">Ex why zed</a>
Many sites work this way and have done so from the moment frames were
invented. You may be interested in some online reading, look for "html
tutorial" or "tag reference". http://www.htmlhelp.com/ is a good start.


Habits are hard to change, and it is not well known, but newer browsers map
those hashed addresses to every id'ed element on a page instead of anchors
with names. This means you only need
<img id="XYZ" src=etc...>
if you are willing to accept only version 5+ browsers will understand your
idea. If this for the internet, this is perhaps 99% of your audience.

By the way, no javascript involved here. Shouldn't this be in a different
newsgroup?
Ivo


Thank you for responding. Sorry I didn't make this clearer. This is
my first post so perhaps I should have used another newsgroup.

I'm using Frames and inline Frames the Left column(FRAME) has all the
hyperlinks when a link is clicked document#1 comes up in
"Main.html"(inline Frame). This is working fine.

I have placed a layer tag above the inline frame in " Main.html" to
display a image if a particular link is clicked, sometimes based on
whats clicked the layer tag will not display a image at all. If
there's an image associated with a hyperlink then document#1 is
displayed in Main inline frame and image#1 should show up in the layer
in "Main.html" I can't seem to link up or (display the image found
in "Image.html" in the layer thats in Main.

Again based on what's clicked look in Image.html find the image and
display it in the layer in Main.
 

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,007
Latest member
obedient dusk

Latest Threads

Top