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

Click outside to hide the overlay?

Expand Messages
  • ventzy_kunev
    I have calendar in overlay, and on button click I show it. Its the same idea in this example Calendar Menu Button with Date on Button Face , but I am no using
    Message 1 of 4 , Jan 31, 2009
    • 0 Attachment
      I have calendar in overlay, and on button click I show it. Its the same
      idea in this example "Calendar Menu Button with Date on Button Face",
      but I am no using Menu Button. When calendar is visible and click
      outside (anywhere on the page) it must hide, like normal "windows" popup
      menu and like in the example. How to do it without Menu Button?
    • Cagatay Civici
      I ve asked for a similar question this week as well. I m showing the calendar inside an overlay, so clicking outside of overlay should hide it. Looking forward
      Message 2 of 4 , Jan 31, 2009
      • 0 Attachment
        I've asked for a similar question this week as well. I'm showing the calendar inside an overlay, so clicking outside of overlay should hide it.

        Looking forward to a solution.

        On Sat, Jan 31, 2009 at 2:16 PM, ventzy_kunev <ventzy_kunev@...> wrote:

        I have calendar in overlay, and on button click I show it. Its the same
        idea in this example "Calendar Menu Button with Date on Button Face",
        but I am no using Menu Button. When calendar is visible and click
        outside (anywhere on the page) it must hide, like normal "windows" popup
        menu and like in the example. How to do it without Menu Button?


      • Satyen Desai
        Hi, This example may help: http://yuiblog.com/sandbox/yui/v260/examples/calendar/datePicker.html (see the _onDocumentClick method - which tries to determine
        Message 3 of 4 , Feb 3, 2009
        • 0 Attachment
          Hi,
          This example may help:

          http://yuiblog.com/sandbox/yui/v260/examples/calendar/datePicker.html
          (see the _onDocumentClick method - which tries to determine where the click originated)

          Not inside an Overlay, but the concept is the same. Clicks are listened for at the document level, and if they don't originate from within the Calendar (or Overlay in your case), the calendar (or Overlay in your case) is hidden.

          Hope that helps,
          Satyen

          ________________________________________
          From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Cagatay Civici
          Sent: Saturday, January 31, 2009 6:43 AM
          To: ydn-javascript@yahoogroups.com
          Subject: Re: [ydn-javascript] Click outside to hide the overlay?

          I've asked for a similar question this week as well. I'm showing the calendar inside an overlay, so clicking outside of overlay should hide it.

          Looking forward to a solution.
          On Sat, Jan 31, 2009 at 2:16 PM, ventzy_kunev <ventzy_kunev@...> wrote:
          I have calendar in overlay, and on button click I show it. Its the same
          idea in this example "Calendar Menu Button with Date on Button Face",
          but I am no using Menu Button. When calendar is visible and click
          outside (anywhere on the page) it must hide, like normal "windows" popup
          menu and like in the example. How to do it without Menu Button?
        • ventzy_kunev
          Thank you. This do the trick! ... datePicker.html ... the click originated) ... listened for at the document level, and if they don t originate from within the
          Message 4 of 4 , Feb 8, 2009
          • 0 Attachment
            Thank you. This do the trick!

            --- In ydn-javascript@yahoogroups.com, "Satyen Desai" <sdesai@...>
            wrote:
            >
            > Hi,
            > This example may help:
            >
            > http://yuiblog.com/sandbox/yui/v260/examples/calendar/
            datePicker.html
            > (see the _onDocumentClick method - which tries to determine where
            the click originated)
            >
            > Not inside an Overlay, but the concept is the same. Clicks are
            listened for at the document level, and if they don't originate from
            within the Calendar (or Overlay in your case), the calendar (or
            Overlay in your case) is hidden.
            >
            > Hope that helps,
            > Satyen
            >
            > ________________________________________
            > From: ydn-javascript@yahoogroups.com [mailto:ydn-
            javascript@yahoogroups.com] On Behalf Of Cagatay Civici
            > Sent: Saturday, January 31, 2009 6:43 AM
            > To: ydn-javascript@yahoogroups.com
            > Subject: Re: [ydn-javascript] Click outside to hide the overlay?
            >
            > I've asked for a similar question this week as well. I'm showing
            the calendar inside an overlay, so clicking outside of overlay should
            hide it.
            >
            > Looking forward to a solution.
            > On Sat, Jan 31, 2009 at 2:16 PM, ventzy_kunev <ventzy_kunev@...>
            wrote:
            > I have calendar in overlay, and on button click I show it. Its the
            same
            > idea in this example "Calendar Menu Button with Date on Button
            Face",
            > but I am no using Menu Button. When calendar is visible and click
            > outside (anywhere on the page) it must hide, like normal "windows"
            popup
            > menu and like in the example. How to do it without Menu Button?
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.