0

ボタンをクリックした後にフォームの質問を表示したい 確認 jquery.thanks...

$("input[value='Close']").click(function () {
                var ValidComment = document.getElementById('comment_update').value;
                if (ValidComment == '') {
                    $("#ErrorUpdate").text("Comment is Required");                
                    return false;
                }
                else {
                    return confirm('Are you sure to close this ticket ?'); 
                    --show form here-??               
                }
            });
4

2 に答える 2

2

これはうまくいくはずですが、テストできません:

        $("input[value='Close']").click(function () {

            if ($("#comment_update").val() == '') {
                $("#ErrorUpdate").text("Comment is Required");                
                return false;
            }
            else {
               if (confirm('Are you sure you want to close this ticket?')) {
               //Show form code goes here
               $("#form").show();              
            }
        });
于 2013-02-14T15:03:00.687 に答える
0

これもうまくいくだろう

$("input[value='Close']").click(function () {
    var ValidComment = document.getElementById('comment_update').value;
    if (ValidComment == '') {
        $("#ErrorUpdate").text("Comment is Required");                
        return false;
    }
    else {
        var result = confirm('Are you sure to close this ticket ?');
        if (result) {
            $("form-here").css("display", "block");
            return true;
        }
        return false;
    }
});
于 2013-02-14T15:03:40.663 に答える