scrolling

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steven Licciardi

    scrolling

    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
  • RobB

    #2
    Re: scrolling

    Steven Licciardi wrote:[color=blue]
    > 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[/color]
    to[color=blue]
    > the top of the page, which is very annoying. Is there any way of
    > stopping the browser resetting the scroll.
    >
    > Thanks[/color]

    <a href="#null" onclick="hideDI V();return false;">.....

    Comment

    • Rebecca Seal

      #3
      Re: scrolling

      That fixed it, thanks.

      "RobB" <ferndoc9@hotma il.com> wrote in message
      news:1111004981 .542065.212000@ f14g2000cwb.goo glegroups.com.. .[color=blue]
      > Steven Licciardi wrote:[color=green]
      >> 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[/color]
      > to[color=green]
      >> the top of the page, which is very annoying. Is there any way of
      >> stopping the browser resetting the scroll.
      >>
      >> Thanks[/color]
      >
      > <a href="#null" onclick="hideDI V();return false;">.....
      >[/color]


      Comment

      • kaeli

        #4
        Re: scrolling

        In article <bec5275.050316 1217.293fd473@p osting.google.c om>,
        steven_licciard i@hotmail.com enlightened us with...[color=blue]
        > 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.[/color]

        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="functi onname();return false;>linky</a>

        --
        --
        ~kaeli~
        A boiled egg in the morning is hard to beat.



        Comment

        • arun

          #5
          Re: scrolling

          or other wise use
          just <a href="javascrip t:functionname( );" >linky</a>

          Comment

          Working...