Reputation: 95
I am developing an application on SharePoint 2010 and I would like to open a New List Form as a new page, not a model dialog from a simple a tag from a Content Editor Web part on a page:
<a onclick='javascript:NewItem2(event, "/_layouts/listform.aspx?PageType=8&ListId={CC94D25C-2BE0-46AC-B8BE-F112D12F0907}&RootFolder=");javascript:return false;' href="/_layouts/listform.aspx?PageType=8&ListId={CC94D25C-2BE0-46AC-B8BE-F112D12F0907}&RootFolder=" target=_blank>Create new item</a>
However, clicking this link opens invariably a model dialog. I precise that I selected 'No' for the Dialogs setting in the Advanced settings for my list.
Does anybody have a clue of what I missed?
Upvotes: 0
Views: 1848
Reputation: 3194
You do not need onclick event to implement this. Just remove onclick attribute completely and leave href only.
Upvotes: 2