/    Sign up×
Community /Pin to ProfileBookmark

Need help for this situation

Hi!

I’ve got a formList that when the user select a value:

onChange=”document.location=’?d=’+this.value”

But this formList is at the bottom of a scrolled page, so each time the page refresh the user always have to scroll down again.

I try this:

<a href=”#dept”></a>

but i can’t figure out how to put it into the onChange event?

t

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@SamFeb 13.2004 — before the formlist, you'd want:

<a name="dept"></a>

then you'd want to change your onchange to this:

onChange="document.location='#dept?d='+this.value"
Copy linkTweet thisAlerts:
@turbauthorFeb 13.2004 — thank samij586
×

Success!

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