Solved

Calendar control and PostBack issue

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…

728 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