Sunday, August 19, 2012

Sharepoint Tweeks and tricks

Is this even possible, some might wonder? Well it is, via querystring options on the command line:
Add Web Parts/Browse ToolPaneView=2
Add Web Parts/Search ToolPaneView=3
Edit Mode mode=edit
View Mode mode=view
Shared Mode PageView=Shared
Personal Mode PageView=Personal

So for example, say you wanted to edit the Shared view of the default page:
default.aspx?mode=edit&PageView=Shared
Say you wanted to Browse web parts and add them to your Personal view:
default.aspx?ToolPaneView=2&PageView=Personal
You can mix and match, and the order of the options do not matter....
Hope this helps
-Andy

Thursday, August 02, 2012

Show ID in Sharepoint Edit Page using javascript

multiple Javascripts from one trigger

<input name="Button1" type="button" value="Submit" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/thanks-for-submission.aspx}')}" />



Show ID Column from CEWP

<script type="text/javascript"> 
 // Item ID in DispForm.aspx and EditForm.aspx 
// Feedback and questions: Christophe@PathToSharePoint.com 
// 
function DisplayItemID() 

var regex = new RegExp("[\\?&]"+"ID"+"=([^&#]*)"); 
var qs = regex.exec(window.location.href); 
var TD1 = document.createElement("TD"); 
TD1.className = "ms-formlabel"; 
TD1.innerHTML = "<h3 class='ms-standardheader'>Issue ID</h3>"; 
var TD2 = document.createElement("TD"); 
TD2.className = "ms-formbody"; 
TD2.innerHTML = qs[1]; 
var IdRow = document.createElement("TR"); 
IdRow.appendChild(TD1); 
IdRow.appendChild(TD2); 
var ItemBody = GetSelectedElement(document.getElementById("idAttachmentsRow"),"TABLE").getElementsByTagName("TBODY")[0]; 
ItemBody.insertBefore(IdRow,ItemBody.firstChild); 

  
_spBodyOnLoadFunctionNames.push("DisplayItemID"); 
</script>

Followers

No Locks without Key

🌿 Bible Verse 1 Corinthians 10:13 "No temptation has overtaken you except what is common to mankind. And God is faithful; ...

Who Am I?

My photo
What is mankind that you are mindful of them, human beings that you care for them? Psalms 8:4 But he made us a little lower than Angels and Crowned with Glory and Honor. How majestic is your name in all the Earth Oh Lord our God!