Solved

Location on Image is Bookmark

Posted on 2003-11-03
7
227 Views
Last Modified: 2010-04-09
Hello,

We have an image that has specific area that we would like pulled up to the top of the page when a user click a link.  Imagine a picture has 10 rows.  Clicking on link "A" brings row 6 to the top of the screen.  Clicking on link "B" brings row 3 to the top of the screen.  In essence, it's the same as a bookmark, but we are bookmarking regions of the image.  How would we write such a link on the image and in the link?

Many thanks,

Yunkaa
0
Comment
Question by:yunkaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 31

Expert Comment

by:seanpowell
ID: 9671809
>>  Imagine a picture has 10 rows.
How is the image divided into these rows? Tables, <br> tags, etc.
0
 

Author Comment

by:yunkaa
ID: 9671859
Hi,

George, thanks for replying!  It was just to give an idea.  It's a whole image, but link one might be the tabletop, link two the seat cushion.  Clicking on the link would pull the ientire mage to the top of the screen in line with the specific region.  If the table top is in the middle of the screen, then the whole image goes up, but it is the mid-image table top that would be reference and focus for the user.

Thanks,

Yun
0
 
LVL 10

Assisted Solution

by:Bustarooms
Bustarooms earned 250 total points
ID: 9671918
umm this maybe?

<html>
<a href="#one">go to one</a><br>
<a href="#two">go to two</a><br>
<a href="#three">go to three</a>
<br><br>
<img src="http://www.google.com/images/logo.gif" alt="no pic" width="500" height="2000">

<div style="position:absolute;left:0;top:30;width:500;height:1;background-color:red;""><a

name="one"></a></div>

<div style="position:absolute;left:0;top:500;width:500;height:1;background-color:red;"><a

name="two"></a></div>

<div

style="position:absolute;left:0;top:1500;width:500;height:1;background-color:red;""><a

name="three"></a></div>

</html>


the red lines are for illustration  you can remove the background-color:red part
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Accepted Solution

by:
seanpowell earned 250 total points
ID: 9671998
That's not a bad solution - there's a coule errors in the code:

<html>
<head>
</head>
<body>
<a href="#one">go to one</a><br>
<a href="#two">go to two</a><br>
<a href="#three">go to three</a>
<br><br>
<img src="http://www.google.com/images/logo.gif" alt="no pic" width="500" height="2000">
<div style="position:absolute;left:0;top:30;width:500;height:1;background-color:red;"><a name="one"></a></div>
<div style="position:absolute;left:0;top:500;width:500;height:1;background-color:red;"><a name="two"></a></div>
<div style="position:absolute;left:0;top:1500;width:500;height:1;background-color:red;"><a name="three"></a></div>
</body>
</html>
0
 

Author Comment

by:yunkaa
ID: 9673024
WOW... you guys ROCK!!!  Please can you tell us how we would write it if the link is in one frame and the picture in another?

Many thanks,

Yun
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9673194
Sure. The following is an example:

The frameset is something like:
<html>
<head>
<title>Frame</title>
</head>
<frameset rows="*,*">
  <frame name="top" src="top.html">
  <frame name="bottom" src="bottom.html">
  <noframes>
  <body>
  <p>This page uses frames, but your browser doesn't support them.</p>
  </body>
  </noframes>
</frameset>
</html>


top.html
******

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<p><a href="bottom.html#one" target="bottom">go to one</a><br>
<a href="bottom.html#two" target="bottom">go to two</a><br>
<a href="bottom.html#three" target="bottom">go to three</a></p>
</body>
</html>

bottom.html
*********
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<img src="http://www.google.com/images/logo.gif" alt="no pic" width="500" height="2000">
<div style="position:absolute;left:0;top:30;width:500;height:1;background-color:red;"><a name="one"></a></div>
<div style="position:absolute;left:0;top:500;width:500;height:1;background-color:red;"><a name="two"></a></div>
<div style="position:absolute;left:0;top:1500;width:500;height:1;background-color:red;"><a name="three"></a></div>
</body>
</html>

The relevant info is:

1. "name" your bottom frame: <frame name="bottom" src="bottom.html">
2. The links must now be coded like: <a href="bottom.html#one" target="bottom">

Thanks,
GM
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9681033
Thanks Yunkaa,
Glad we could help!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question