当autoopen设置为false时,jquery ui对话框未打开。 [英] jquery ui dialog is not opening when autoopen is set to false.

查看:382
本文介绍了当autoopen设置为false时,jquery ui对话框未打开。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码是..

my code is..

$(document).ready(function () {
          
             $("#dialog").dialog({
                autoOpen: false,
                appendTo: "form",
                           
                show: {
                    effect: "fade",
                    duration: 1000
                },
                                 hide: {
                    effect: "explode",
                    duration: 1000
                },

                buttons: {
                    Ok: function () {
                        $("[id*=btnmsgOk]").click();
                        $(this).dialog("close");
                    },
                    Cancel: function () {
                        $(this).dialog("close");
                    }
                }
            });
     
     });



然后我称之为


then i call it by

$('<%=btnSave.ClientID %>').click(function () {
                $("#dialog").dialog("open");
             });



但它不起作用。当设置autoopen为true时,ok按钮会生成popstback,但我想让它按下按钮点击。

任何帮助都是appkyiated thanky。


but it doesnot work.When in set autoopen true then ok button generates popstback but i want it working on button click.
any help is appriciated thankyou.

推荐答案

document )。ready( function (){
(document).ready(function () {


#对话框)。对话框({
autoOpen: false
appendTo: form

show:{
effect: 淡入淡出
持续时间: 1000
},
hide:{
效果: explode
持续时间: 1000
},

按钮:{
确定:功能(){
("#dialog").dialog({ autoOpen: false, appendTo: "form", show: { effect: "fade", duration: 1000 }, hide: { effect: "explode", duration: 1000 }, buttons: { Ok: function () {


(< span class =code-string> [id * = btnmsgOk])。click();
("[id*=btnmsgOk]").click();


这篇关于当autoopen设置为false时,jquery ui对话框未打开。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆