admin管理员组文章数量:1312829
I need to open a new list item form on hyperlink, or button click, in a Sharepoint 2010 page. The page and the list are in different site collections. I must do this from the Sharepoint Designer, or directly editing the page in a browser, Visual studio project is not possible/allowed...
Can this be done, and how?
I need to open a new list item form on hyperlink, or button click, in a Sharepoint 2010 page. The page and the list are in different site collections. I must do this from the Sharepoint Designer, or directly editing the page in a browser, Visual studio project is not possible/allowed...
Can this be done, and how?
Share Improve this question asked Jan 17, 2013 at 17:17 EedohEedoh 6,2889 gold badges42 silver badges63 bronze badges1 Answer
Reset to default 3P.S. Most safe way to address New form is to use ListForm.aspx page, as follows:
/_layouts/listform.aspx?PageType=8&ListId={PUT-LIST-GUID-HERE}
(PageType value goes from PAGETYPE enumeration)
i think you should be work when use PAGE_NEWFORMDIALOG : New form for a file dialog box.Value=9
as describe on msdn. if New form is not open on model pop up than
Try this :
HyperLink
<a href='javascript:;' onclick='Opendialog()'>New Item</a>
Opendialog is Javascript Function
function Opendialog() {
var options = SP.UI.$create_DialogOptions();
options.resizable = 1;
options.scroll = 1;
options.url = SiteURLWhichExistList + "/_layouts/listform.aspx?PageType=8&ListId={PUT-LIST-GUID-HERE}";
options.dialogReturnValueCallback = Function.createDelegate(null, CloseCallback);
SP.UI.ModalDialog.showModalDialog(options);
}
Note : SiteURLWhichExistList
pass your site collection url in where your list exist.
Hope it helps!!
本文标签:
版权声明:本文标题:javascript - How to open New List Item Form in modal dialog in a SharePoint 2010 page from different site collection - Stack Ove 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741866599a2401942.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论