在“编辑表单模板"中找到用于Jquery的控件. [英] Find control in Edit Form Template for Jquery popup.
问题描述
大家好,我只是想知道您是否可以帮助我.我正在尝试访问EditFormTemplate中的控件(图像按钮).当用户按下此按钮时,我只是想显示一个弹出窗口.不管我尝试什么,我似乎都无法找到控件.当我尝试访问表单上的其他控件时,代码工作正常,因此我知道它不是javascript.这是我的代码.
Hey guys im just wondering if you could help me. I am trying to access a control (image button) inside an EditFormTemplate. I wast to display a popup when the user presses this button. No matter what I try I cant seem to get it to find the control. The code works fine when I try access a different control on the form so I know it''s not the javascript. Here''s my code.
$(document).ready(function() {
$('#btnUpdate').click(function(e) { // Button which will activate our modal
$('#modal').reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 200, // how fast animtions are
closeonbackgroundclick: true, // if you click background will modal close?
dismissmodalclass: 'close' // the class of a button or element that will close an open modal
});
return false;
});
});
而我的aspx页面
And my aspx page
<pre lang="HTML">
<asp:ImageButton ID="btnUpdate" ImageUrl="~/Images/GridItemUpdate.gif" runat="server" CommandName="Update" ToolTip="Save Record">
</asp:ImageButton>
如果有人能帮助我做得很好,谢谢大家
If anyone can help i''d be truly greatful, thanks guys
推荐答案
(文档). (函数(){
(' #btnUpdate').click(函数(e){// 按钮,它将激活我们的模式
('#btnUpdate').click(function(e) { // Button which will activate our modal
(' #modal').reveal({// 将以显示方式打开 动画:' 淡化',// fade,fadeAndPop,没有 animationspeed: 200 ,// 动画速度有多快跨度> closeonbackgroundclick: true ,// 如果您单击背景,则将显示关闭? dismissmodalclass:' close' // 将关闭打开的模式的按钮或元素的类 }); 返回 假; }); });
('#modal').reveal({ // The item which will be opened with reveal animation: 'fade', // fade, fadeAndPop, none animationspeed: 200, // how fast animtions are closeonbackgroundclick: true, // if you click background will modal close? dismissmodalclass: 'close' // the class of a button or element that will close an open modal }); return false; }); });
而我的aspx页面
And my aspx page
<pre lang="HTML">
<asp:ImageButton ID="btnUpdate" ImageUrl="~/Images/GridItemUpdate.gif" runat="server" CommandName="Update" ToolTip="Save Record">
</asp:ImageButton>
如果有人能帮助我,我会成为真正的伟大者,谢谢大家
If anyone can help i''d be truly greatful, thanks guys
这篇关于在“编辑表单模板"中找到用于Jquery的控件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!