/    Sign up×
Community /Pin to ProfileBookmark

set scroll position of div in frame

Hi. I’m having trouble getting one frame to update the scroll position of an imagemap in a div in a second frame, using the following:

<html>
<head>
<title>frametest</title>
</head>
<frameset rows=”70%,*”>
<frame src=”map_frame.htm” id=”imageframe” name = “imageframe”>
<frame src=”display.htm” id=”showframe” name = “showframe”>
</frameset>
<body></body>
</html>

<html>
<head>
<title>map</title>
<link rel=”stylesheet” href=”js/menu.css”>
<style>
div.toolbar {
position:absolute;
overflow:hide
top:0px;
left:125px;

}

div.menu {
position:absolute;
left:0px;
top:0px;
width:100px;
}
div.map {
position:absolute;
overflow:scroll;
top:72px;
left:125px;
height: 75%;
width:85%;
}

</style>

<body>
<div class=”map”>
<img src=”img/map.jpg” usemap = “#map1” border=”0″/>
<map name = “map1”>
<area… />
</map>
</div>

</body>
</html>

Since the image is MUCH larger than the screen, the scrollbars allow sections of it to be seen. Each area on the image map corresponds to a page targeted at “showframe”. When it loads from a link besides the image map area, the map frame scroll position must be adjusted to make the matching area visible. I know the (x,y) coord.
What kind of code does this? Where should it go?
Any help? I’m really stuck.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@darkwolf1authorNov 29.2003 — please?
×

Success!

Help @darkwolf1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...