javascript - jquery calls are not fired in update panel -
i have update panel updates each 1 minutes.
in side it, have 2 input files, when click on each one, datepicker function called. include these scripts datepicker
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"/> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"/>
also, have script in head
tag
<script> $(function () { $("#cldrfrom, #cldrto").datepicker(); }); </script>
the datepicker works before update panel updates content. after that, not working anymore.
what should please?
note
i have function pageload(sender, args)
in 1 of scripts don't think cause problem
you need reinitialise date picker after each refresh in update pannel, use code
$(document).ready(function () { sys.webforms.pagerequestmanager.getinstance().add_pageloaded(pageloaded) }); function pageloaded(sender, args) { $("#cldrfrom, #cldrto").datepicker(); }
Comments
Post a Comment