Operating System - HP-UX
1745808 Members
3608 Online
108722 Solutions
New Discussion юеВ

Why a web Page associated with a JS moves to the top when JS is activated ?

 
Pankaj Yadav_1
Frequent Advisor

Why a web Page associated with a JS moves to the top when JS is activated ?

I have a unique question .

Suppose we attach a Javascript to a link.
When we click the link a JS function is called and the body of the web page moves to the top if we had scrolled down the page.

I want to stop the web page from going to the top.

How to do this ?
2 REPLIES 2
Pankaj Yadav_1
Frequent Advisor

Re: Why a web Page associated with a JS moves to the top when JS is activated ?

The results are displayed at the bottom.

So I want the page to go at the bottom after we click the link .

How to do this ?
Pankaj Yadav_1
Frequent Advisor

Re: Why a web Page associated with a JS moves to the top when JS is activated ?

I got the solution using anchors -->

Go to Bottom