The parent  Window/page Moves , when clicked on a calendar control

Posted on 2009-02-20
Last Modified: 2012-06-27
Hi All,
I have an aspx page, which has several textboxes, which has calendar icon next to it.When the user clicks on the icon, a little calendar control appears, just like the travel site.
But when the User clicks the icon, the parent window, moves up, taking the calendar control to the top of the page.The user has to scrool down to select the next textbox.
I want the calendar control to float next to the textbox, which calls it and The parent window to stop moving up.
Here is how i call my calendar.I tried setting the "top", It get to that point, but still parent window moves.
<asp:TextBox ID="txtStDate1"   runat="server" onfocus="this.blur();"></asp:TextBox>

                <%  Dim clickHandlerStart1 As String = String.Format("'Controls/Calendar.aspx?textbox={0}','calendar_window','width=235,height=218,top=300,left=200,scrollbars=no,status=no,minimize=no,resizable=no);calendar_window.focus()", txtStDate1.ClientID)

                    CS1.HRef = "#"

                    CS1.Attributes.Add("onclick", clickHandlerStart1)%><a id ="CS1" runat="server"><img alt="PopUp Calendar" src="Images/popup-calendar.gif" />

Open in new window

Question by:SaraDob
    LVL 15

    Expert Comment

    Your best bet for this and future use would be to use the calendar extender in the ajax toolkit.
    LVL 1

    Author Comment

    Thanks for the suggestion. I will try to use in future projects, but this does not need ajax right now, is there any other way , other than ajax, to stop it from moving?
    LVL 1

    Accepted Solution

    Ajax might be the solution, but for now, I removed Clickhandler and (CS1.HRef = "#") and inserted style="cursor:hand" in img tag, That did the trick, Clickhandler was causing the page move.
    thanks for looking

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now