Posted on: 5/20/2011 11:55:04 AM | Views : 279

The first time the page loads it shows value 2 selected in dd1 and the date is readonly and blank.
When I select 1 from dd1, the date is change to by enableDisable(). I place the cursor in tb1 and a calendar is popup. Iselect a date from the calendar and tb1 is populated with the selected date. So far so good.
Now I click a button to submit the page for saving the data. It saves 1 for dd1, but somehow it saves the old value for the date which is blank. Why is that?
If I select a date before changing dd1's value, then it saves the new date fine. I don't know why it behaves differently when I change dd1's value before selecting a date.
<script language="javascript" type="text/javascript"> function enableDisable(sender, target) { if (sender.value == "1") { document.getElementById(target).setAttribute('readOnly', false); } else { document.getEl ...

Go to the complete details ...