Loading ...
Sorry, an error occurred while loading the content.

Re: [OLmws] Controlling scrolling using the MODALSCROLL setting

Expand Messages
  • Foteos Macrides
    Patrick, The # as an href or action value resolves to an instruction to jump to an undefined anchor in the current document, and thus causes a jump to the
    Message 1 of 5 , Nov 28, 2007
    • 0 Attachment
      Patrick,
       
      The "#" as an href or action value resolves to an instruction to jump to an undefined anchor in the current document, and thus causes a jump to the top of the current document.  It was recommended in the early days of javascript as a way to have the browser "do nothing" when onclick attempts to invoke javascript but the browser does not support javascript or has it disabled.  That was a misguided recommendation.  If you instead use "javascript:void(0);" that in effect means "do nothing whether or not the browser has javascript enabled" and is what you really want.  If the onclick ultimately returns false (and javascript is enabled), neither href or action value will be used, but otherwise it will be, and you want the value which really does nothing.
       
      Fote
      --
       
      ----- Original Message -----
      Sent: Wednesday, November 28, 2007 5:15 PM
      Subject: Re: [OLmws] Controlling scrolling using the MODALSCROLL setting

      Thank you, indeed that has solved the problem. Many thanks for spotting it! I have to admit I don't really understand what is happening when you use href="#" compared with href="javascript:void(0)" - I will find out!!
      [snip]
    Your message has been successfully submitted and would be delivered to recipients shortly.