Jquery UI对话框(方法?)



我有这个jQuery UI对话框

当单击DELETE时,将打开一个窗口并出现表单。

在窗口上有一个OK按钮。当点击时,什么也没有发生。也许我需要设置方法,但OK按钮链接到下面的JS。

如何设置正确的方法?

Javascript OK Button:

$( "#dialog-message" ).dialog({
    autoOpen: false,
    modal: true,
    buttons: {
        OK: function() {
            $( this ).dialog( "close" );
        }
    }
});
UI对话框:

    <div class="widget">    
        <div class="head"><h5 class="iAlert">DELETE</h5></div>
        <div class="body aligncenter">
            <div class="uDialog">
                <div id="dialog-message" title="Delete">
                    <p><img src="images/exclamation.png" alt="" class="icon" /><br/>
                    <br/>
                    </p>
                    <div class="aligncenter">Input your password</div>
                    <div class="uiForm">
                        <form method="post" action="delete.php" class="mainForm">
                            <input type="password" value="" name="inputtext"/>
                        </form>                            
                    </div>
                </div>
                <!-- Sample page content to illustrate the layering of the dialog -->
                <input type="button" value="DELETE" class="redBtn" id="opener" />
            </div>
        </div>
    </div>

我修改了下面的OK函数,其中#delete是表单ID。

$( "#dialog-message" ).dialog({
    autoOpen: false,
    modal: true,
    buttons: {
    OK: function() {
    //$( this ).dialog( "close" );
            $("#delete").submit();
        }
    }
});

相关内容

最新更新