Solved

Location on Image is Bookmark

Posted on 2003-11-03
7
221 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now