By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,962 Members | 1,889 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,962 IT Pros & Developers. It's quick & easy.

Double left click jump to top, same with ctrl or shift to jump to bottom?

P: n/a
I have this little bitty script on my site that makes a jump to the top
of the screen when one double left clicks anywhere in the page.

I was wondering if it could be altered so the double left click stays
present as it is, and when a key is pressed alongside it, say.. shift,
ctrl, alt.. , it will jump to the bottom instead of the top.

Here is the code as it is now:
<script type="text/javascript">
function dblclick() {
window.scrollTo(0,0);
}
if (document.layers) {
document.captureEvents(Event.ONDBLCLICK);
}
document.ondblclick=dblclick;
</script>
Is this possible at all?
Thanks!
Eadwine Rose

Oct 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Eadwine Rose" <ea*****@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
>I have this little bitty script on my site that makes a jump to the top
of the screen when one double left clicks anywhere in the page.

I was wondering if it could be altered so the double left click stays
present as it is, and when a key is pressed alongside it, say.. shift,
ctrl, alt.. , it will jump to the bottom instead of the top.

Here is the code as it is now:
<script type="text/javascript">
function dblclick() {
window.scrollTo(0,0);
}
if (document.layers) {
document.captureEvents(Event.ONDBLCLICK);
}
document.ondblclick=dblclick;
</script>
Is this possible at all?
Thanks!
Eadwine Rose
You might try placing an anchor at the bottom of the page.
Oct 14 '06 #2

P: n/a
You might try placing an anchor at the bottom of the page.

Thing is I know virtually NOTHING of javascript, so I have no idea on
how to even begin with this. Yes I could do it through HTML, easily,
but I want it to be sort of a mouse gesture rather than a link that has
to be clicked.

Oct 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.