From the course: SharePoint Advanced: Enhancing Functionality with JavaScript

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Capture events

Capture events

- [Instructor] So let's talk about how JavaScript works with SharePoint for capturing and reacting to events. Actually, I need to define that just a little bit. What we're talking about here are user events, clicks, mouse-overs, and that kind of UI activity. We saw a quick example of event handling in the script we looked at earlier, that counted clicks. Obviously, each click is an event, right? JavaScript does this kind of thing really well. And JavaScript events are literally all through everything in SharePoint these days. You know how menus change if you click an item in a list or a library? You guessed it, it's JavaScript that makes that change happen. Let's open up the developer tools and look at this for a moment. I'm going to use the element picker to highlight this check mark right here, and get the code for this. Now, I'm in Internet Explorer right now, and this is a little bit different in all of the developer tools, but for all of them, you can see what events are…

Contents