首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我想移除工具提示

我想移除工具提示
EN

Stack Overflow用户
提问于 2014-03-21 14:49:12
回答 1查看 89关注 0票数 0

我想删除工具提示,"Do you really want to remove the agent?"在我的web应用程序。问题是,如果我删除工具提示,确认对话框中的内容也会被删除。我只想移除工具提示。下面是我的代码。

代码语言:javascript
复制
function remove(cellvalue, options, rowObject) {
    var sessionEnterpriseId = '<%= session.getAttribute("enterpriseId")%>';
    var sessionRoleId = '<%= session.getAttribute("role")%>';

    if(sessionRoleId == 2) {
        if(rowObject.enterpriseId == sessionEnterpriseId) {
            return "<a href='javascript:confirmDelete("+ rowObject.id +")' ><img src='./images/remove.gif' title='Remove Agent'><div id='dialog-confirm' title='Remove Agent' style='display:none'> <p style='position: absolute; top: 20px; width: 303px;'><span class='ui-icon ui-icon-alert' style='float: left; margin: 0 7px 20px 0;'></span>Do you really want to remove the agent..?</p</div></a>";
        }
        else {
            return "<img src='./images/removeGray.gif' title='Remove Agent'>";
        }
    }
    else {
        return "<a href='javascript:confirmDelete("+ rowObject.id +")' ><img src='./images/remove.gif' title='Remove Agent' ><div id='dialog-confirm' title='Remove Agent' style='display:none'> <p style='position: absolute; top: 20px; width: 303px;'><span class='ui-icon ui-icon-alert' style='float: left; margin: 0 7px 20px 0;'></span>Do you really want to remove the agent..?</p></div> </a>";
    }
}

function confirmDelete ( a ) {  
    $(function() {      
        $( "#dialog-confirm" ).dialog({
            resizable: false,
            height:140,
            modal: true,
            buttons: {
                "YES": function() {
                    $(this).load("./removeAgent.action?id="+a,  function() {
                        $("#agentResult").trigger("reloadGrid");
                    });
                    $(this).dialog("close");
                },
                "   NO    ": function() {
                    $(this).dialog("close");
                }
             }
        });
    });
}

帮我解决这个问题。提前谢谢。

EN

回答 1

Stack Overflow用户

发布于 2014-05-08 18:07:08

语法错误,第7行

</p</div>

这将导致jQuery选择器失败。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22562016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档