Calender Control and JQuery

mmsi used Ask the Experts™
IDE: ASP.Net 2008
Language: C#, JQuery

Task: I am creating an page, with a button called, 'Set Appointment".  Using Jquery, when the user selects the "set appointment" button, a div (which contains some controls with in a table) appears and allows the user to select a date from an calender control.  when all the controls are populated (within the div), the user selects an update button, the database is updated and the div disappears.

Problem: if the user selects a date on the calender control the div disappears, not allowing the user finishing setting up the appointment.  

Other Information: I don't have a problem hiding and unhiding the div, I just need the div not to disappear when the user selects a date from the calender control, however, I still need the calender control to function as normal.  I can't use $e.preventDefault on the calender control because then the user will not be able to select a date.  I know I can add a runat server attribute to the div and do this without using jQuery. But is it possible to do this using JQuery?  If so can somene help me?  ~thanks in advance.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Can suggest you a work around for this type of problem

1. Place a textbox on page with style="display:none"
2. You can set the value to zero, identifying as the div is hidden.
3. When the show div is called set the value of this control to 1. i.e. the control is visible
4. You need to switch the value of text ox between 0 and 1.
5. Place the code at the end of page as
<script type="">
   if(document.getElementById('txtboxHidden').value == '1')
      //Display your Div code here

Hope this will help you


Thank you very much, your suggestion worked for me.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial