asmaoui / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

Not working with elements pulled through a http request in javascript #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am pulling page elements via Ajax and everything works fine on that end
but the input elements with the date-picker class applied are not working
correctly. If I put the element in the parent page it works fine like it
should. Is it going to be impossible to make those elements work since they
are being called by a http request? Right now the jquery scripts are all in
the parent page. I tried putting them in the call page as well but that did
nothing as well.

Original issue reported on code.google.com by usscreen@gmail.com on 15 Jan 2009 at 11:59

GoogleCodeExporter commented 9 years ago
I just noticed, the css is still being applied....? The element being loaded is
loaded onload of the body. You would think if the style is still being applied 
to the
element then the functionality would as well...? 

Original comment by usscreen@gmail.com on 16 Jan 2009 at 12:09

GoogleCodeExporter commented 9 years ago
You need to initialise the date pickers once the new elements have been added 
to the
page by the ajax call... You could use the success handler of your ajax request 
to
re-initialise the date pickers...

Original comment by kelvin.l...@gmail.com on 16 Jan 2009 at 12:11

GoogleCodeExporter commented 9 years ago
Genius! I figured it was something like that, just didn't think of that... 
Works Now!
Thanks!

Original comment by usscreen@gmail.com on 16 Jan 2009 at 12:17

GoogleCodeExporter commented 9 years ago
Awesome - glad it helped :)

Original comment by kelvin.l...@gmail.com on 16 Jan 2009 at 12:24

GoogleCodeExporter commented 9 years ago
Thanks guys. Your conversation helped me a lot.

Original comment by ajithfra...@gmail.com on 22 Jan 2009 at 10:09