Category: jQuery
-
Looping through a SharePoint List Column with jQuery and replacing a GUID with a name from CRM 2011
This is a very specialized piece of code, but it came together nicely, so I thought I would share it. I have a SharePoint List that has a bunch of Microsoft CRM 2011 Contact GUIDs in it. Some columns have one GUID and others have multiple GUIDs separated by semicolons. My goal was: when a…
-
Using jQuery to hide some columns, append a new column, and popup the contents of the hidden columns
In this previous post, I showed how to hide the 4th and 5th columns of a SharePoint List (I am not talking about EditForm.aspx page, I am talking about the table view). I took this a step further and appended a new row containing an “more info” onClick event that pops up the contents of…
-
Using _spPageContextInfo, AJAX and SAMAccountName to show a hidden item in a SharePoint page.
I wanted to have a link on a page (could be anything) show only for certain people. I knew there was variable on every page named _spPageContextInfo.userId, which is the current user’s SharePoint user Id. I used the following code to take that userId and query the User Information List to get the SAMAccountName, and…
-
Looping through a SharePoint List column and acting on each item in the column using jQuery
I wanted to loop through a couple columns in the Default View of a SharePoint List. The jQuery code below would loop through the 4th, 5th, and 10th columns and alert the contents of that column. Obviously you can do anything you like with the matches. More tomorrow on how I was using this method
-
How I am using a Delegate control, code in a Document library, and jQuery to customize SharePoint 2010
In this post, I showed how to put a delegate control at the top over every page, and in the control add the links to the jQuery libraries. This is nothing new, there are many articles that show how to do this. I took this a step further and I included code to do the…
-
jQuery to hide a column
I wanted to hide a column and I found this simple way to do that in jQuery. Can’t find where I originally came across it. Sorry if you figured it out first. This hides the 5th and 6th columns. I am going to use this in a SharePoint list where I want to hide the…
-
jQuery to remove mailto
I wanted to remove a mailto and leave just the email address:
-
How to add custom JavaScript code to all SharePoint 2010 pages (DelegateControl)
As I said in this post, there are plenty of articles on how to do this. This is more of a note for myself, as I have to “re-learn” this every time I need to customize SharePoint. There are 2 ways (that I know of) that you can add code to every page in SharePoint…
-
‘b’ is null or not an object
This is a reminder to my self that this blog post has the solutoin to the “b” error when working with the Client Object Model. Basically I need to change this: createDelegate(this, this.onSuccessMethod) to this: createDelegate(this, onSuccessMethod)
-
Move the “Add new item” to the top of a list page in SharePoint 2010
We did not like how SharePoint 2010’s “Add new item” was on the bottom of the page. we wanted to move it to the top. The following jQuery code moves it to the top of the page: $(“#s4-mainarea”).prepend($(“td.ms-addnew”)) hope that helps someone.
