开发者

JQuery Date Picker issue inside Update Panel

开发者 https://www.devze.com 2023-02-17 15:45 出处:网络
i am using this Sys.WebForms.PageRequestManager.getInstance().add_endRequest(addDataPicker);for my script to load on every post back for JQuery Datepicker. Because i am using updatepanel. Its working

i am using this Sys.WebForms.PageRequestManager.getInstance().add_endRequest(addDataPicker); for my script to load on every post back for JQuery Datepicker. Because i am using updatepanel. Its working fine in second postback.but its not working 开发者_如何学Gothe first time of page load. Please Help me out


Sys.WebForms.PageRequestManager.getInstance().add_endRequest(addDataPicker) event is raised after an asynchronous postback is finished and control has been returned to the browser.So your addDataPicker is added after postback is done, you need to add this after document is loaded, i.e. if you are using Jquery this can be done by,

$(document).ready(function() {
   // put all your datepicker init function here.
   });

Hope this will help.

0

精彩评论

暂无评论...
验证码 换一张
取 消