您的位置:首页 > 产品设计 > UI/UE

Update the link url in the Moss 2010 to call SP.UI.ModalDialog.showModalDialog

2012-09-21 15:23 447 查看
Copy the code to "<script type="text/javascript">  var navBarHelpOverrideKey = "WSSEndUser";" :

 

<script type="text/javascript">
var navBarHelpOverrideKey = "WSSEndUser";
$(document).ready(function () {
var span1 = $("span").filter(function () {
return  $(this).text() == "NewIdea" && $(this).parent()[0].tagName == "A";
})[0];

if(span1)
{
var a = span1.parentNode;
a.href = "http://moss/Lists/TestCustomList/NewForm.aspx?Source=http://moss";
a.onclick = openDialog;
}

});

function CallBackfromDialog(dialogResult)
{
alert(dialogResult);
};

function openDialog() {
var options = {
url: "http://moss/Lists/TestCustomList/NewForm.aspx?Source=http://moss",
width: 800,
height: 600,
title: "New Idea",
dialogReturnValueCallback: CallBackfromDialog,
};

SP.UI.ModalDialog.showModalDialog(options);
return false;
}
</script>



 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  url 2010 function idea
相关文章推荐