Popup无法正常工作

时间:2016-01-30 09:52:56

标签: jquery asp.net-mvc-5

代码:

<div id="dialog-confirm">
        Reward added to Employee
    </div>


    $("#AddReward").click(function ()
        {
            EmployeeId=JSON.stringify(currentEmployeeId=@Model.EmployeeId)

            GivenOn=JSON.valueOf(givenOn=@Model.GivenOn)

            $.ajax({

                type: "POST",
                url: "@(Url.Action("AddRewardToEmployee", "Employee"))",
                data: {
                    "employeeId":EmployeeId,

                    "givenOn":GivenOn
                },
                               success: function (data)
                {

                    $("#dialog-confirm").dialog({
                        resizable: false,
                        modal: true,
                        title: "Resource Added",
                        height: 200,
                        width: 300,
                        buttons: {
                            "Ok": function (e)
                            {
                                $(this).dialog('close');
                                window.location.href="/Employee/Edit?employeeId="+@Model.EmployeeId;
                            }
                        }
                    });
                },


            });

        });

背景

在AddRewardToEmployee操作中,我向员工添加奖励,然后我想显示该奖励的弹出窗口已成功添加。

问题:

操作方法,即AddRewardToEmployee工作正常但弹出窗口没有显示。脚本中有什么问题吗?

0 个答案:

没有答案