Search This Blog

Monday 9 September 2013

how to remove empty record message ,ie There are no items to show in this view....' from a list


add the following code in the page

<script>
function ChangeDiscussionMessage()
{

  var a = document.getElementsByTagName("TD")
  for (var i=0;i<a.length;i++)
  {
    if (a[i].className=="ms-vb")
    {
      if (a[i].innerText.indexOf("There are no items to show in this view")>-1)
      {
         a[i].innerHTML = "&nbsp;<b>&LT;--&nbsp;&nbsp;Your message here.</b>";
      }
    }
  }
}

_spBodyOnLoadFunctionNames.push("ChangeDiscussionMessage")

</script>

No comments:

Post a Comment