Placeholder Image

Subtitles section Play video

  • (logo chimes)

  • - [Phil] Let's start looking at

  • some of the things that JavaScript

  • is used for in SharePoint.

  • Now, before we begin,

  • I have another disclaimer for you.

  • You cannot embed JavaScript on SharePoint

  • modern experience pages,

  • at least not at this time.

  • Microsoft has realized that a lot

  • of the service issues they need to solve

  • for people are the result of them modifying CSS,

  • changing master pages,

  • creating custom themes, et cetera.

  • Their response has been to increasingly

  • lock down what people can do in SharePoint,

  • basically removing the problematic features.

  • Unfortunately, these are pretty valuable things.

  • So you can imagine the squawking.

  • I personally think that at some point,

  • they'll be forced to restore features,

  • but for now,

  • if you want finer control of your sites,

  • you'll want to stick to the classic experience

  • wherever possible.

  • That's sad, but it's the way it is.

  • Anyways.

  • Thing number one you can do with JavaScript.

  • It lets you add or modify UI elements

  • on the screen.

  • I can actually give you a great example

  • of where SharePoint is already using JavaScript.

  • This is stuff that's happening behind the scenes

  • when you change views for libraries

  • or lists.

  • Let's take this library as an example.

  • Here's the normal view.

  • Now what happens if I go in,

  • and modify the view.

  • More specifically, what happens

  • if I change the view style.

  • I'm always surprised at how few people

  • seem to know about view styles.

  • This is a fairly useful little tool

  • that changes the way view information

  • is displayed above and beyond specifying,

  • which fields are shown filtering and the like.

  • I'm going to pick this newsletter

  • no lines style,

  • and will apply that.

  • So the look of the list has changed noticeably.

  • We have alternating lines,

  • the lines themselves are spaced out differently.

  • What happened?

  • Let's take a quick look

  • at the page source in developer mode.

  • Check out this script down here.

  • This section is looking for what form

  • we are using for our data display,

  • and just a little further along,

  • there's basically all the changes described,

  • and put into play.

  • Other ways you could use JavaScript for UI.

  • Let's say you wanted to change

  • the actual input form.

  • By redefining the form,

  • and form displays with JavaScript,

  • you can make one column into two

  • or change font colors.

  • Yes.

  • There are other tools you can use to do this,

  • but this is definitely a way to coax

  • a little bit more out of your sites

  • with JavaScript.

  • (upbeat instrumental music)

(logo chimes)

Subtitles and vocabulary

Click the word to look it up Click the word to find further inforamtion about it