/    Sign up×
Community /Pin to ProfileBookmark

New Browser window – scrollTo doesn’t work

Hello. I have a problem and was hoping someone could help me. Here is the situation:

I have an image map. When a certain area of the map is clicked on, a new broswer window opens to a particular location within that page using scrollTo. Using the code pasted below this works fine locally on my machine but as soon as I upload it online the scrollTo function stops working and the new browser window instead opens to the default top left.

Any ideas to what I’m doing wrong?

[COLOR=Blue]<map name=”Map” id=”Map”>

<area shape=”rect” coords=”9,5,106,125″ href=”” target=”blank” onclick=”var newWin=window.open(‘subareas/grid_1.html’,’maps’,’status=no,scrollbars=yes,scrollbars.visible=true,resizable=yes,menu=no,width=475,height=550′);[B]newWin.scrollBy(100,50)[/B];newWin.focus();return false;”>

</map>[/COLOR]

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceJun 23.2006 — What is the error message? ...and don't say there isn't one. ? Find it.
Copy linkTweet thisAlerts:
@Pano_SkrivanosauthorJun 23.2006 — Well, there isn't one, or at least not that I know of. The window simply opens to the default left top corner. It's as if the scrollTo code is completly ignored...
Copy linkTweet thisAlerts:
@phpnoviceJun 23.2006 — Which browser?
Copy linkTweet thisAlerts:
@Pano_SkrivanosauthorJun 23.2006 — I've tried both Explorer and Firefox.

If it helps here is the link to the page: http://marinematters.org/atlas/subareas_draft.html.

Scroll down to the map, if the first or second boxed area on the map is selected (the remaining boxes aren't linked yet), a second smaller browser window is opened. If the scrollTo was working, it would open to the corresponding location as represented by the box on the first map but it doesn't. Strange that it initially worked locally on my machine.

By the way I appreciate your help.
Copy linkTweet thisAlerts:
@phpnoviceJun 23.2006 — The problem is that you have to wait to perform that programmatic scrolling until *after* the page has loaded complete. When you were doing it locally, the page would load almost instantaneously. Over the Internet, it is not so fast. ?
Copy linkTweet thisAlerts:
@Pano_SkrivanosauthorJun 23.2006 — Ahh I see.

But being a true novice (unlike yourself), can you offer any suggestions as to how I may fix this?
Copy linkTweet thisAlerts:
@James_GatkaJun 23.2006 — Pano, please check your private messages.
×

Success!

Help @Pano_Skrivanos 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,
)...