Calendar control to paste a date into textbox via Javascript.

Hey all&

Ok, i have a <ASP:TextBox> and <ASP:Calendar> control on my page. OnSelectionChanged of the Calendar control I want to put the date value into the TextBox via Javascript as I do not want to do a postback on the page.

Is there any way of doing thins WITHOUT using AJAX?

Nugs
LVL 2
NugsAsked:
Who is Participating?
 
NugsAuthor Commented:
sabeesh: i have seen this code in my search. and it is the exact idea i am looking to occumplish, with one exception. The calendar control and textbox are on the same page. SO even if i render cleint side script on the OnSelectionChanged ebent handler of the control, it still will need to post the back back... (maybe i am wrong)

Essentially what i have in my ASPX code is this:
-------------------------------------------------------------------------------------------------------------
<div>              
<asp:TextBox ID="checkout" runat="server" Width="75" CssClass="form_objects"></asp:TextBox>
<a href="#" onclick="showHideLayers('checkout_cal','','show')">
<asp:Image ID="checkoutbutt0" runat="server" ImageUrl="~/images/cal.gif" AlternateText="Pick a Check In date" />
</a><br />
<div id="checkout_cal" style="position:absolute; z-index:1; display:none"><asp:Calendar ID="Calendar6" Width="50" runat="server"></asp:Calendar></div>
</div>
-----------------------------------------------------------------------------------------------------------------

How would i get the results from your link you posted if the textbox and calendar control is on the same page?

Nugs
0
 
NugsAuthor Commented:
Any further ideas on this?

Nugs
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.