Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET Calendar Control. Please Help!

Status
Not open for further replies.

spidervenom

Programmer
Mar 8, 2003
19
0
0
US
Hi,

I am pretty new to asp.net. I would like to create a pop up calendar control where users can select the date from the control and that date will then add to a textbox

I get the following error:

Run Time Error has occurred
'window.opener.frmCalendar.txtDate' is null or not an object


this is what I have done so far, but it doesn't work:

calendar.aspx

<html>
<head>
</head>
<body>
<form runat="server">
<asp:Calendar id="Calendar1" runat="server" OnDayRender="Calendar1_dayrender" OnSelectionChanged="Calendar1_SelectionChanged" ShowTitle="true" SelectionMode="Day" Width="120" Height="60" ForeColor="#00000" BorderColor="#000000" FirstDayOfWeek="Monday" BackColor="#ffffff">
<TitleStyle backcolor="#000080" forecolor="#ffffff" />
<NextPrevStyle backcolor="#000080" forecolor="#ffffff" />
<OtherMonthDayStyle forecolor="#c0c0c0" />
</asp:Calendar>
<asp:Literal id="Literal1" runat="server"></asp:Literal>
</form>
</body>
</html>



viewTask.aspx (only part of the code is shown here)

<html>
<head>
</head>
<body>
<form name="frmCalendar" runat="server">
.
.
.
<input type="text" name="txtDate" />
<a href="javascript:calendar_window=window.open('calendar.aspx?formname=frmCalendar.txtDate','calendar_window','width=640,height=640');calendar_window.focus()">Calendar </a>
.
.
.
</form>
</body>
</html>


Thanks in advance!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top