How do I ... Make the Calendar pop up over other controls

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

    How do I ... Make the Calendar pop up over other controls

    Hello,
    I would like for my users to have a calendar control
    only when needed. IE button click for the control to
    appear and then once the date is selected. Populate a text
    box and the calendar control then is invisible.
    How do I make the calendar control pop up over other
    control in a asp.net c# environment?

    Charles

  • Jeffrey Tan[MSFT]

    #2
    RE: How do I ... Make the Calendar pop up over other controls


    Hi Charles,

    You can use client script to set the calendar's left and top to the same as
    the button.
    When loading page, the calendar is invisable, in the button's click event,
    you can
    set the button to invisable and the calendar to visable.
    In calendar's SelectionChange d event, you set the calendar invisable again
    and button visable.
    The selected result display in the text box.

    But I think it is a better way of place the calendar into a individual
    <div> tag and show it and set its
    position in the button's click event.

    Hope this helps,
    Best regards,
    Jeffrey Tan
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    --------------------
    | Content-Class: urn:content-classes:message
    | From: "Charles" <CWildner@bells outh.net>
    | Sender: "Charles" <CWildner@bells outh.net>
    | Subject: How do I ... Make the Calendar pop up over other controls
    | Date: Mon, 29 Sep 2003 21:08:49 -0700
    | Lines: 10
    | Message-ID: <127d01c38708$8 cec4b50$a401280 a@phx.gbl>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="iso-8859-1"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    | Thread-Index: AcOHCIzsNOywYW3 JTBicMm8x7lCcBw ==
    | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
    | Path: cpmsftngxa06.ph x.gbl
    | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1881 12
    | NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
    | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
    |
    | Hello,
    | I would like for my users to have a calendar control
    | only when needed. IE button click for the control to
    | appear and then once the date is selected. Populate a text
    | box and the calendar control then is invisible.
    | How do I make the calendar control pop up over other
    | control in a asp.net c# environment?
    |
    | Charles
    |
    |

    Comment

    • Charles Wildner

      #3
      RE: How do I ... Make the Calendar pop up over other controls

      Hello,

      Thanks for responding, could you be more specific? I have to see the
      code, concepts don't work for me.
      Also, the results textbox needs to be an asp:TextBox runat server.

      Charles




      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Ignacio Machin

        #4
        Re: How do I ... Make the Calendar pop up over other controls

        Hi Charles,

        You can include your calendar inside a <div> tag and set the visibility
        style of it hidden, then on the click of the button you will change the
        visibility to visible.
        now you will have to play a little with the interaction between server side
        code and client side code to do this. It's not difficult though. basically
        what you need is set the onclick action of the button toa function that
        change the visibility of the div , if you use only one calendar by page then
        this div can have a predefined ID so the javascript function may look like:

        function ChangeVisibilit y( show )
        {
        if ( show )
        document.all[ "Div Name"].style.visibili ty = visible;
        else
        document.all[ "Div Name"].style.visibili ty = hidden;
        }

        and you will need two more functions:
        one for the button click to show the calendar:
        function ShowCalendar()
        {
        //set back the date from the textbox to the calendar
        ...
        //show the calendar
        ChangeVisibilit y(true);
        }

        and another for get back the value and hide it:
        function HideCalendar()
        {
        //get the value fmro the calendar and put it back in the input box
        ...

        ChangeVisibilit y(false);
        }

        This is basically it, of course you still need to fill the ... sections but
        that is where the fun is :)


        Hope this help,

        --
        Ignacio Machin,
        ignacio.machin AT dot.state.fl.us
        Florida Department Of Transportation

        "Charles" <CWildner@bells outh.net> wrote in message
        news:127d01c387 08$8cec4b50$a40 1280a@phx.gbl.. .[color=blue]
        > Hello,
        > I would like for my users to have a calendar control
        > only when needed. IE button click for the control to
        > appear and then once the date is selected. Populate a text
        > box and the calendar control then is invisible.
        > How do I make the calendar control pop up over other
        > control in a asp.net c# environment?
        >
        > Charles
        >[/color]


        Comment

        • Jeffrey Tan[MSFT]

          #5
          RE: How do I ... Make the Calendar pop up over other controls


          Hi Charles,

          I think what Ignacio said is clear to implement your logic.
          But I think you also should set the div's postion properly in script code,
          such as: you may need the div to follow the move of your mouse, you can get
          this down by handle the onmousemove event. There are many script samples on
          the internet, you can search easily.

          Hope this helps,
          Best regards,
          Jeffrey Tan
          Microsoft Online Partner Support
          Get Secure! - www.microsoft.com/security
          This posting is provided "as is" with no warranties and confers no rights.

          --------------------
          | From: Charles Wildner <cwildner@bells outh.net>
          | References: <aZzcg6xhDHA.21 88@cpmsftngxa06 .phx.gbl>
          | X-Newsreader: AspNNTP 1.50 (ActionJackson. com)
          | Subject: RE: How do I ... Make the Calendar pop up over other controls
          | Mime-Version: 1.0
          | Content-Type: text/plain; charset="us-ascii"
          | Content-Transfer-Encoding: 7bit
          | Message-ID: <#wHT#e0hDHA.60 4@TK2MSFTNGP10. phx.gbl>
          | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
          | Date: Tue, 30 Sep 2003 04:41:08 -0700
          | NNTP-Posting-Host: actionjackson13 3.dsl.frii.net 216.17.147.133
          | Lines: 1
          | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
          | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1881 76
          | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
          |
          | Hello,
          |
          | Thanks for responding, could you be more specific? I have to see the
          | code, concepts don't work for me.
          | Also, the results textbox needs to be an asp:TextBox runat server.
          |
          | Charles
          |
          |
          |
          |
          | *** Sent via Developersdex http://www.developersdex.com ***
          | Don't just participate in USENET...get rewarded for it!
          |

          Comment

          • Jeffrey Tan[MSFT]

            #6
            RE: How do I ... Make the Calendar pop up over other controls


            Hi Charles,

            Is your problem resovled?

            If you still have any unclear, please feel free to let me know.

            Best regards,
            Jeffrey Tan
            Microsoft Online Partner Support
            Get Secure! - www.microsoft.com/security
            This posting is provided "as is" with no warranties and confers no rights.

            --------------------
            | X-Tomcat-ID: 95425438
            | References: <aZzcg6xhDHA.21 88@cpmsftngxa06 .phx.gbl>
            <#wHT#e0hDHA.60 4@TK2MSFTNGP10. phx.gbl>
            | MIME-Version: 1.0
            | Content-Type: text/plain
            | Content-Transfer-Encoding: 7bit
            | From: v-jetan@online.mi crosoft.com (Jeffrey Tan[MSFT])
            | Organization: Microsoft
            | Date: Thu, 02 Oct 2003 03:57:39 GMT
            | Subject: RE: How do I ... Make the Calendar pop up over other controls
            | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
            | Message-ID: <R4D7FlJiDHA.17 72@cpmsftngxa06 .phx.gbl>
            | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
            | Lines: 43
            | Path: cpmsftngxa06.ph x.gbl
            | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1884 83
            | NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
            |
            |
            | Hi Charles,
            |
            | I think what Ignacio said is clear to implement your logic.
            | But I think you also should set the div's postion properly in script code,
            | such as: you may need the div to follow the move of your mouse, you can
            get
            | this down by handle the onmousemove event. There are many script samples
            on
            | the internet, you can search easily.
            |
            | Hope this helps,
            | Best regards,
            | Jeffrey Tan
            | Microsoft Online Partner Support
            | Get Secure! - www.microsoft.com/security
            | This posting is provided "as is" with no warranties and confers no rights.
            |
            | --------------------
            | | From: Charles Wildner <cwildner@bells outh.net>
            | | References: <aZzcg6xhDHA.21 88@cpmsftngxa06 .phx.gbl>
            | | X-Newsreader: AspNNTP 1.50 (ActionJackson. com)
            | | Subject: RE: How do I ... Make the Calendar pop up over other controls
            | | Mime-Version: 1.0
            | | Content-Type: text/plain; charset="us-ascii"
            | | Content-Transfer-Encoding: 7bit
            | | Message-ID: <#wHT#e0hDHA.60 4@TK2MSFTNGP10. phx.gbl>
            | | Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
            | | Date: Tue, 30 Sep 2003 04:41:08 -0700
            | | NNTP-Posting-Host: actionjackson13 3.dsl.frii.net 216.17.147.133
            | | Lines: 1
            | | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
            | | Xref: cpmsftngxa06.ph x.gbl
            microsoft.publi c.dotnet.langua ges.csharp:1881 76
            | | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
            | |
            | | Hello,
            | |
            | | Thanks for responding, could you be more specific? I have to see the
            | | code, concepts don't work for me.
            | | Also, the results textbox needs to be an asp:TextBox runat server.
            | |
            | | Charles
            | |
            | |
            | |
            | |
            | | *** Sent via Developersdex http://www.developersdex.com ***
            | | Don't just participate in USENET...get rewarded for it!
            | |
            |
            |

            Comment

            Working...