0

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?

3
  • Do you need to select ALL items in the whole list? Or only on the current page? Commented Aug 2, 2012 at 9:36
  • @RubenHerman only the Items of the current page!
    – MOI
    Commented Aug 2, 2012 at 10:18
  • Ok, than you can still use the anwser I described below. To check all items faster, you can also include jQuery Commented Aug 2, 2012 at 10:35

1 Answer 1

1

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");
3
  • where do I implement this code?
    – MOI
    Commented Aug 2, 2012 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 Commented Aug 2, 2012 at 10:21
  • here are some examples: techtrainingnotes.blogspot.be/2012/05/… Commented Aug 2, 2012 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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