Useful bit of Javascript

Published: 2008-06-30

Never thought about using javascript for this before but I had a requirement to force the window to the top of the page whilst executing a javascript onClick event.  Very simple but thought I'd note it down for future reference: scrollTo(x,y)

window.scrollTo(0,0);

More from this section

RECENT ARTICLES

Lightweight blog created on Ruby/GAA/Datastore stack

Put this together a month or two back but never got around to replaci... read more

Using Node JS and Couch DB Stack for Web Dev

With the recent hype surrounding Node.js I thought I'd better get my ... read more

Campaign Monitor API Using PHP and SOAP

Campaign Monitor has a fairly comprehensive API and support docs.&nbs... read more

Google Maps Snippet

Absolute bare basics when it comes the Google Map api but a snippet o... read more

CREDITS

powered by php-wax the php framework