Thursday, 18 April 2013

SharePoint 2010 List "Add new item" link control appear on the top of the page


SharePoint 2010  List "Add new item" link control  appear on the top of the page


Hi,
     SharePoint list has a large amount of list items, to add a new item  it take time to scroll down the page
     Avoid this try to add Add new item button in top of the page as follows......

     In a sharepoint list page to want to add a button in top                                                                              



 Add a Content Editor Web Part in the List Page

      => To edit the page in site action to add content editor webpart as ......


  => Add a new contents in the content editor web part as......

       Content editor webpart click "Click add new content" link it show the ribbon bar, click  Format text and  HTML to click Edit Html source as.....


 Add a code in the Edit Html Source

 To add piece of code in the edit html source as.....

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">

$(document).ready(function() {
    var mainTable = $("td.ms-addnew").parent().parent().parent().prev();
    var newTable = $("td.ms-addnew").parent().parent().parent();
    newTable.insertBefore(mainTable);
});
</script>




then click ok now add new item button look like this.............



Another Approach:

 sharepoint list page to click on edit page button and edit webpart as...........



To change Tool bar type as Show tool bar as.............

 Then the Tool bar look like this..........


3 comments:

  1. I successfully created the new button on top of the list for a Library. But, I noticed that the bottom Button is missing (+Add document). Do you have any suggestions?

    ReplyDelete
  2. wow, it works.
    thanks you very much bro, I really appreciate for your help

    ReplyDelete
  3. Thanks, it works well.
    Is it possible to have a script to create the "add new item" link both in top and bottom of a list?

    ReplyDelete