Scroll To Top/Bottom Of Page

By JoeSimmons Last update Nov 17, 2009 — Installed 1,601 times.

Implementable in HTML?

in
Subscribe to Implementable in HTML? 8 posts, 2 voices



Fredz User
FirefoxWindows

How can I implement this script in a standard HTML web page?

Is it possible, and how?

 
JoeSimmons Script's Author
FirefoxWindows

It should be possible to just copy the code as it is and use it on your page. I didn't use any Greasemonkey specific functions or anything like that.

 
Fredz User
FirefoxWindows

I tried and it didn't work. I put it in the HEAD of the HTML document.

< SCRIPT LANGUAGE="JavaScript" >
(scroll code inserted here)
< /SCRIPT >

I didn't put the code itself, but you know it already ;0)

 
JoeSimmons Script's Author
FirefoxWindows

I just tested it. You're right it doesn't work just verbatim. The first line causes an error and it needs to run on full page load anyways.

This code should work, just use this: http://pastebin.com/AbJsDc1E

 
Fredz User
FirefoxWindows

It worked beautifully, thanks Joe :)

 
Fredz User
FirefoxWindows

Works in Firefox, but IE doesn't like it :(

 
JoeSimmons Script's Author
FirefoxWindows

Fredz wrote:
Works in Firefox, but IE doesn't like it :(
Yeah there are probably methods that aren't IE friendly, but I don't know what they are cuz I never use IE.
 
Fredz User
FirefoxWindows

I don't blame you one bit. Firefox is so much better