JG Vimalan's Blog

It is all about coding!

Hiding default toolbar in DispForm.aspx page in SharePoint

The following has to be added in the DispForm.aspx for the selected list (I’ve used Calendar).

You can locate this page using SharePoint designer.

<asp:Content ContentPlaceHolderId=”PlaceHolderTitleAreaClass” runat=”server”>
<script id=”onetidPageTitleAreaFrameScript”>

<!– Code for removing toolbar menu –>
var objToolBar = document.getElementById(“ctl00_m_g_894df972_bb01_4b6f_8c99_1247cadd83f0_ctl00_ctl01_ctl00_toolBarTbl”);

var objParent = objToolBar.parentNode;

var  tdEvent =  document.getElementById(“SPFieldAllDayEvent”);
var  tdRecurrence =  document.getElementById(“SPFieldRecurrence”);
var  tdLink =  document.getElementById(“SPFieldCrossProjectLink”);

var  tr = tdEvent.parentNode;
var  table = tr.parentNode;



Happy Coding!


August 10, 2009 - Posted by | SharePoint

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: