Solved

Calendar control and PostBack issue

Posted on 2012-04-11
2
433 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
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…

831 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