?
Solved

Capturing Date OnClick of ASP Calendar using Javascript

Posted on 2009-04-08
3
Medium Priority
?
513 Views
Last Modified: 2012-05-06
I am using .NET 2003 ASP.NET calendar control in C# and ASP.NET and am trying to capture the date that user clicked on and bring that into a text box in another web form. Want to use java script. Any suggestions please.
0
Comment
Question by:dotnetpro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:spprivate
ID: 24098523
What you are using is a server side control and you want to do a javascript on this.
Ideal way would be to store the value in a cookie or session and on click of the calendar redirect to the next page and read the value from the cookie or session
0
 
LVL 1

Accepted Solution

by:
dotnetpro earned 0 total points
ID: 24099375
I see a bunch of rows with <href in them when i do a view source on the Calendar control...there has to be a way to hijack the __dopostback in javascript...
0
 
LVL 1

Author Comment

by:dotnetpro
ID: 24107979
Just passed ID of the textbox as a querystring at onclick with window.open and then on the target page
i did window.opener.document.forms(0)." + hdnctrl.Value + ".value = '"; where hdnctrl is the id of a hiden control that captures the id of previouspage textbox.and then ran self.close(). This script i registered with clientscriptblock under OnSelectionChanged() event of the calendar control..
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

771 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