/    Sign up×
Community /Pin to ProfileBookmark

newbie seeking example of "advice given"

I put an applet on a website that scrolls an image across the screen. When someone clicks on part of the image he is sent to a new window in that frame describing the area pictured. Only problem I’m having is when he returns to the original scrolling image he has to start at the beginning of the scroll.
I’d like to return him to the point in the image where he left.

I wrote the author of the applet and he wrote the following that exceeds my knowledge of JS. Any help supplying an example would be appreciated.

“I have take a look at your page and it looks great! You can make the scroller start at the same point when the user returns to the page by JavaScript. It’s require some knowledge of JavaScript, and I only have time to point out a solution: Use the JavaScript onLoad() and onRefresh() functions to call your own function which will call the scrollers jump(x,y) function. In your JavaScript code you have to store the users position when leaving the page by the getCursorX() and getCursorY(). The JavaScript variables have to be stored in variable declared as var, eg var x,y; and prefeable in a JavaScript sourcefile, which speed it all up.”

The page is located at: [url]http://www.gokadar.com/base_pages/tour/example3/tour3.htm[/url]

What would be very helpful would be an example of what this code would look like and where it would be placed, since I have only a basic knowledge of how javascript works.

Sorry to appear dense,
dude101

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@JonaMay 12.2003 — He is saying to use <body [b]onload="functionName();"[/b]> for instance. And in your function, declare variables x and y:

var x, y;

function functionName(){

jump(x, y);

}

You just have to set x and y to be a number. I think that's what he's saying.... Ugh, too much Java... Not enough Script.. I need coffee. :p
×

Success!

Help @dude101 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...