Tag: JavaScript


  • Code for adding pop-up links to list items and to Library items. Full Code For a List Item:  <a onclick="javascript:NewItem2(event, &quot;http://SiteName/_layouts/listform.aspx?PageType=8&amp;ListId={83747BB4-49C6-4181-B4A3-F8C6B611846D}&amp;RootFolder=&quot;); javascript:return false;" href="/_layouts/listform.aspx?PageType=8&amp;ListId={83747BB4-49C6-4181-B4A3-F8C6B611846D}&amp;RootFolder=" target="_self"> Submit Feedback</a> Full Code for a Library Item:  <a href="http://SiteName/_layouts/Upload.aspx?List={94AC86A8-6774-4822-A197-A98542251678}&amp; RootFolder=" onclick="javascript:NewItem2(event, &quot;http://SiteName/_layouts/Upload.aspx?List={94AC86A8-6774-4822-A197-A98542251678}&amp;RootFolder=&quot;); javascript:return false;" target="_self"> Upload a Document</a> Source: http://erikswenson.blogspot.dk/2010/09/how-to-create-hyperlink-to-modal-pop-up.htm

  • Create link to “New Item” <a href=”javascript:OpenPopUpPageWithTitle(‘</site/library>/_layouts/15/Upload.aspx?List={<List-GUID>}&RootFolder=&IsDlg=1′,RefreshOnDialogClose,null,null,'<Title>’);”>Add item</a> Create link to “New Folder” <a href=”javascript:OpenPopUpPageWithTitle(‘</site/library>/Forms/Upload.aspx?RootFolder=&Type=1&IsDlg=1′,RefreshOnDialogClose,null,null,'<Title>’);” >New Folder</a>

  • Simple javascript command to open the dialog modal form function OpenPopUpPage(url, callback, width, height) function OpenPopUpPageWithTitle(url, callback, width, height, title) function OpenPopUpPageWithDialogOptions(dialogOptions) DialogOptions supports: Options Property Description title A string that contains the title of the dialog. url A string that contains the URL of the page that appears in the dialog. If both url and html are specified, url takes precedence.…

  • If you have several SharePoint Forms, where you want to hide the input field and using SharePoint Designer to create a custom form is not an option. Here is my collection of jQuery you can insert, using the ScriptEditor webpart. Edit the “view” of a ListItem (DispForm.aspx) Open an element on the list, thus letting…