[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Calendar control to paste a date into textbox via Javascript.

Posted on 2007-07-30
3
Medium Priority
?
581 Views
Last Modified: 2007-08-13
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
0
Comment
Question by:Nugs
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
sabeesh earned 1000 total points
ID: 19595464
0
 
LVL 2

Author Comment

by:Nugs
ID: 19595507
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
 
LVL 2

Author Comment

by:Nugs
ID: 19666250
Any further ideas on this?

Nugs
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

873 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