首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

GirdView模板列中按钮怎么添加jquery提示框

2012-10-12 
GirdView模板列中按钮如何添加jquery提示框已有jquery提示框如下:(return true 和 false 失效)JScript cod

GirdView模板列中按钮如何添加jquery提示框
已有jquery提示框如下:(return true 和 false 失效)

JScript code
 function jqueryconfirm(){                $('#dialogRenew').dialog({                    bgiframe: true,                    resizable: false,                    modal: true,                    autoOpen: false,                    overlay: {                        backgroundColor: '#000',                        opacity: 0.5                    },                    buttons: {                        Ok: function () {                            $(this).dialog('close'); //return true;                        },                        Cancel: function () {                            $(this).dialog('close'); //return false;                        }                    }                });            }


 模板列代码如下:
HTML code
<asp:TemplateField HeaderText="Bestaetigen</br>操作">                                                <EditItemTemplate>                                                    <asp:Button ID="btnUpdate" Text="更新" ToolTip="更新" runat="server" CommandName="Update" />                                                    <asp:Button ID="btnCancel" Text="取消" ToolTip="取消" runat="server" OnClientClick="jqueryconfirm()" CommandName="Cancel" />                                                </EditItemTemplate>                                                                           </asp:TemplateField>


现要实现,点取消是弹出div层(作为提示框),点ok则执行取消后台代码,点cancel则保留当前状态不动。
按如上方式的代码实现的结果为 点 取消 后 又弹提示框 又执行取消后台代码

[解决办法]
要执行的内容直接用AJAX做处理会好些。

热点排行