scrolling

S

Steven Licciardi

I am using display:none to make a DIV disappear, this works fine, but
when I press the link to make the div disappear the browser scrolls to
the top of the page, which is very annoying. Is there any way of
stopping the browser resetting the scroll.

Thanks
 
R

RobB

Steven said:
I am using display:none to make a DIV disappear, this works fine, but
when I press the link to make the div disappear the browser scrolls to
the top of the page, which is very annoying. Is there any way of
stopping the browser resetting the scroll.

Thanks

<a href="#null" onclick="hideDIV();return false;">.....
 
K

kaeli

I am using display:none to make a DIV disappear, this works fine, but
when I press the link to make the div disappear the browser scrolls to
the top of the page, which is very annoying. Is there any way of
stopping the browser resetting the scroll.

Link?
Are you using <a href> type thing?
If so, return false. The browser is just following the href like a good boy.

<a href="#" onClick="functionname();return false;>linky</a>

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,630
Members
45,338
Latest member
41Pearline46

Latest Threads

Top