Solved

Calendar control and PostBack issue

Posted on 2012-04-11
2
431 Views
Last Modified: 2012-04-12
I have a web form with a button (button1) and a div with dropdownlis, a bunch of texbox controls on it, a button(button2) and a calendar control.

The div and its elements are not visible until user clicks on button1 - the only control visible on the form. I use JQuery to make the div and its elements visible.

her is my JQuery code:

$(document).ready( function(){
	 $('#div1').css('display', 'none');
                 $('#button1').click(function(e){
	         e.preventDefault();
	         $('#div1').css('display', 'block'); 
	 });
 });

Open in new window


So when I click on button1, my div1 becomes visible, I select and item from a dropdown, then I click on a calendar control to select a value and my div becomes invisible. it reatins all the selections and re-appears if I click on button1 once again, but it is not satisfactory. I tried preventing a postback of calendar control but then it does not retain a selection in the calendar control.

How do i get around this issue?
0
Comment
Question by:YZlat
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 37837321
0
 
LVL 35

Author Comment

by:YZlat
ID: 37837677
UpdatePanel worked for me. Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Full Screen problem when auto scale IFRAME 2 61
Runtime Error 2 28
How to drill down using class name and find the text? 25 32
Connection String 16 43
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now