Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Pass Date to TextBox in asp.net
joezimo
Junior Member

Posts: 2
Registered: 12/9/2005
Location: Buffalo, NY
Member Is Offline
posted on 12/9/2005 at 08:03 PM Reply With Quote
Pass Date to TextBox in asp.net


Sorry for the newbie question, I'm trying to learn. I've got the calendar working well, but I need to pass the date to TextBox1 on my page, not the 'input1' that came with the example. I've looked at this forum, but can't get it to work. My code:

<HTML>
<HEAD>
<title>calendar</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="JavaScript" src="calendar2.js"></script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<p>
<a href="javascript:cal1.popup();">Click here</a>
</p>
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 40px" runat="server"></asp:TextBox>
<asp:LinkButton id="lnkHome" style="Z-INDEX: 103; LEFT: 16px; POSITION: absolute; TOP: 112px" runat="server">Home</asp:LinkButton>
</form>
<script language="javascript">
var cal1 = new calendar2(document.forms['Form1'].elements[0]);
</script>
</body>
</HTML>

I know the var statement is not correct, so if anyone can direct me on how to do this, I would greatly appreciate it.

Joe
View User's Profile View All Posts By User U2U Member
joezimo
Junior Member

Posts: 2
Registered: 12/9/2005
Location: Buffalo, NY
Member Is Offline
posted on 12/9/2005 at 08:25 PM Reply With Quote

Ok, I went to asp.net forum and found the solution. I had to change the var statment:

var cal1 = new calendar2(document.forms['Form1'].TextBox1);

Hope this helps someone!

Joe
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004