Hi,
I'm working on an app that loads a series of forms dynamically (via
ajax) into a static DOM region. One of the forms is using the
datepicker ui widget on two fields. When the datepicker fields are
initialized after loading (via an ajax call) the "ui-datepicker-div"
is added to the end of the static part of the page (as expected). Due
to the nature of the process various user interactions may cause the
form to load again (with new data pre-loaded in the fields, again via
ajax). All of this works as expected.
The issue: on my local (dev) system, each time the form loads the
datepicker is initialized and the "ui-datepicker-div" is added
resulting in many "ui-datepicker-div" regions added to the DOM (one
for each ajax call). To prevent this I added $('#ui-datepicker-
div').remove(); to the code that initializes the forms resulting in
only one ever being present.
The odd part: the exact same code, delivered from the production
server, regardless of browser of any other variable I can determine,
never adds more than one "ui-datepicker-div" region. Each successive
call uses the original one added. In production I've had to remove the
$('#ui-datepicker-div').remove(); statement because it actually
disables the datepicker the second time the form loads.
I cannot explain this behavior. Can you? Does this make any sense?
Thanks
--
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en.