View Full Version : Setting cursor focus causes page scroll

Feb 14th, 2003, 03:24 AM

Web page is about 10 screens long, with a newsletter signup form at the bottom. I set the cursor focus to the first form field.

On opening the page in the web browser, it automatically scrolls down to the cursor position at the bottom of the page.

How do I keep the cursor focus AND get the page to open without scrolling?

(The reason I do it this way is because it's a general routine applied to many web pages.)


Feb 14th, 2003, 04:04 AM
Put this in the field:

<input type="text" onfocus="self.scrollTo(0,0);this.onfocus=null">