How to include a java script in a form

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
MES5464
Posts: 94
Joined: Mon Aug 26, 2013

19 Sep 2013

I want to use the Date.js script in my forms. How do I reference it?

I don't think using this in the javascript panel is right: <script src="date.js"></script>

MES5464
Posts: 94
Joined: Mon Aug 26, 2013

19 Sep 2013

I acomplished this by adding an HTML control to the form and added the <script> tag to the date.js.

It works, but is this the best way to do this?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

21 Sep 2013

Sure, you can include script with HTML-control, but if this script is used in multiple forms it will be better to include it in the master-page.

MES5464
Posts: 94
Joined: Mon Aug 26, 2013

23 Sep 2013

In my "Master Pages" in SharePoint Designer I have the following:

AdvancedSearchLayout.aspx

DefaultLayout.aspx

minimal.master

NewsHomeLayout.aspx

oslo.master

PeopleSearchResults.aspx

ReportCenterLayout.aspx

SearchMain.aspx

SearchResults.aspx

seattle.master

TabViewPageLayout.aspx

v4.master

welcomelayout2.aspx


My guess is I should put the <script> tag in either the:

DefaultLayout.aspx

oslo.master

seattle.master

In which file should I put the script tag?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

24 Sep 2013

Your current master-page is seattle.master

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests