/    Sign up×
Community /Pin to ProfileBookmark

jump to the top of web page

I have this statment at the bottom of a page, that onclick, opens a IFrame at the top of the same page:

<a href=’contacts.php?lang=$lang&id=$id&tipoc=info’ target=’I2′><span style=’background-color=#CC3300; font face=verdana size=15px; color=#ffffff’>info</span></a>

Because the Iframe opens on top needs to scroll the page up in order to view the Iframe. Then I would like to add a extra code to the same statment, that makes the page to jump automatically to the top.

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@pacerierAug 10.2006 — firstly insert this at the top of the page <a name="flashplace">

and replace your link with this:
[code=html]<a href="#flashplace" onclick="window.I2.location='contacts.php?lang=$lang&id=$id&tipoc=info';">info</a>[/code]
Copy linkTweet thisAlerts:
@JoseSilvaauthorAug 10.2006 — firstly insert this at the top of the page <a name="flashplace">

and replace your link with this:
[code=html]<a href="#flashplace" onclick="window.I2.location='contacts.php?lang=$lang&id=$id&tipoc=info';">info</a>[/code][/QUOTE]



Hi

Thanks for the tip.

I manage to do it this simple way:

onclick="window.location='#';"

Even without "firstly insert this at the top of the page <a name="flashplace">"

Hope that gives you another solution.

Best regards
×

Success!

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