I am using this plugin:
我正在使用这个插件:
http://plugins.jquery.com/project/updnValidatorCallout
This controls to be validated are inside an updatepanel. Before posting back everything works fine, after a async postback the callout plugin messes up.
要验证的控件位于更新面板内。回发之前一切正常,在异步回发之后,callout插件会搞砸。
I'm initializing the plugin like so:
我正在初始化插件,如下所示:
$(document).ready(function() {
$.updnValidatorCallout.attachAll();
});
I tried putting this in the pageLoad and endRequest of the UpdatePanel but with no success.
我尝试将它放在UpdatePanel的pageLoad和endRequest中,但没有成功。
Anyone knows more about this?
谁知道更多关于这个?
1 个解决方案
#1
This is due to how the UpdatePanel works. When UpdatePanel refreshes, it will replace the content enclosed inside it. This will break your plugin because it will not be able to find the original plugin.
这是由于UpdatePanel的工作原理。当UpdatePanel刷新时,它将替换其中包含的内容。这会破坏你的插件,因为它无法找到原始插件。
To resolve this, call this 'attachAll' method when the UpdatePanel has finished refreshing to bind it again.
要解决此问题,请在UpdatePanel完成刷新后再次绑定它时调用此“attachAll”方法。
#1
This is due to how the UpdatePanel works. When UpdatePanel refreshes, it will replace the content enclosed inside it. This will break your plugin because it will not be able to find the original plugin.
这是由于UpdatePanel的工作原理。当UpdatePanel刷新时,它将替换其中包含的内容。这会破坏你的插件,因为它无法找到原始插件。
To resolve this, call this 'attachAll' method when the UpdatePanel has finished refreshing to bind it again.
要解决此问题,请在UpdatePanel完成刷新后再次绑定它时调用此“attachAll”方法。