Howdy,

I am using a master page where i have a update panel.

On the .ascx page(user control) i have a text box where i am displaying the Jquery calendar.

I have another text box where on the text changed event i am posting back.

After post back I cant display the calendar. what could be the reason?

My jquery code is given below



<script type="text/javascript">

function getStyle(el, styleProp) {
var x = document.getElementById(el) || document.body;
if (x.currentStyle)
var y = x.currentStyle[styleProp];
else if (window.getComputedStyle)
var y = document.defaultView.getComputedStyle(x, null).getPropertyValue(styleProp);
return y;
}
var x = getStyle(null, 'direction')
if (x == 'ltr')
$("input[id$=DOB]").datepicker({ changeMonth: true, changeYear: true, showOtherMonths: true, dateFormat: 'dd/mm/yy' });

if (x == 'rtl')
$("input[id$=DOB]").datepicker({ changeMonth: true, changeYear: true, showOtherMonths: true, dateFormat: 'yy/mm/dd' });

</script>



Thanks