?
Solved

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

Posted on 2009-02-20
3
Medium Priority
?
197 Views
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("calendar_window=window.open('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

0
Comment
Question by:SaraDob
  • 2
3 Comments
 
LVL 15

Expert Comment

by:aibusinesssolutions
ID: 23696291
Your best bet for this and future use would be to use the calendar extender in the ajax toolkit.

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx
0
 
LVL 1

Author Comment

by:SaraDob
ID: 23722958
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?
0
 
LVL 1

Accepted Solution

by:
SaraDob earned 0 total points
ID: 23735504
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
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

809 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