SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I want to do: I have a custom list that contains a lot of items. When an user loads the list, all items of his view should be checked. If there is a special value in the listitem a notifiaction should be added.

What I've tried: I didn't find a way to trigger the onload event. I've searched in the custom ListEventReceiver and in the Javascript ClientModel.

Does any one have an idea how to solve this?

share|improve this question
Do you need to select ALL items in the whole list? Or only on the current page? – Ruben Herman Aug 2 '12 at 9:36
@RubenHerman only the Items of the current page! – MOI Aug 2 '12 at 10:18
Ok, than you can still use the anwser I described below. To check all items faster, you can also include jQuery – Ruben Herman Aug 2 '12 at 10:35

You'll need a combination of js and the sharepoint client object model (client object model is to check te value of a listitem).

Use this function to start your code after the sharepoint js is loaded:

 ExecuteOrDelayUntilScriptLoaded(myInitMethod, "sp.js");
share|improve this answer
where do I implement this code? – MOI Aug 2 '12 at 10:19
you have some possibilities... you can add it in a js file, add a scriptblock to your (master)page, add a content editor webpart and edit the html – Ruben Herman Aug 2 '12 at 10:21
here are some examples:… – Ruben Herman Aug 2 '12 at 10:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.