使用 jQuery 加载外部 ajax 内容时,外部 ajax 内容内的 tabcontainer 默认情况下不可见
我想将复杂的ajax表单加载到另一个文件中,外部ajax表单内的tabcontainer控件默认隐藏,我不明白为什么?
I want to load a complex ajax form into another file, the tabcontainer control inside the external ajax form is be default hidden, I cannot figure out why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您指的是 AjaxControlToolkit 选项卡容器吗?最有可能的是,当您使用 jquery AJAX 获取该表单时,选项卡容器控件工作所需的任何启动脚本都不会被触发。您可以检查响应(获取外部表单的请求) - 将 AJAX 请求与同一表单的正常请求进行比较,并查看缺少哪些启动脚本。
我还建议您分享一些代码,以便提供更好的答案。
另一方面,我的经验是 ASP.NET Server 控件(包括 ajax-toolkit)在 jquery AJAX 中不能很好地发挥作用。它们设计用于与 UpdatePanel 模型配合使用。我宁愿使用 html/java 脚本小部件,例如 Jquery 插件,以实现更好的控制。在这种情况下,请查看 Jquery UI 选项卡 作为选项卡容器的替代方案。
Are you referring to AjaxControlToolkit tab-container? Most probably, any start-up scripts that are needed for tab-container control to work are not getting fired when you are using jquery AJAX to get that form. You can inspect the response (for the request to get your external form) - compare the AJAX request to normal request to the same form and see what are the start-up scripts that are missing.
I also advise you to share some code so that better answer could be offered.
On different note, my experience is that ASP.NET Server controls (including ajax-toolkit) does not play well in jquery AJAX. They are designed to work with UpdatePanel model. I rather use html/java-script widgets such as Jquery plug-ins for the better control. In this case, do have a look at Jquery UI Tabs as alternative to tab container.