Overview
The Javascript (Link) User Item adds a link to a Javascript source file to the current page.
Properties
Title
The Title property identifies the User Item in the User Items list. The Title has no other purpose for this User Item.
Enabled
See Enabled in the Common Properties section of the User Items help page.
URL
The URL property identifies the Javascript source file that GedSite will link to the page.
The URL may be an absolute URL. If so, include a full link including the HTTP or HTTPS protocol, the domain name, etc.
The URL may also be a relative URL. If so, place the ".js" file in the Input (-i) folder for the site inside a "js" subfolder. In the URL, specify
../js/filename.js
Substitute the actual name of the file for "filename
".
Script Location
Use the Script Location property to indicate where the link should be inserted in the page HTML:
- Head
- The link will be inserted in the HEAD element of the page. This is usually not the best choice, and should be used only when the script will not work properly if inserted at the end of the BODY element.
- Body
- The link will be inserted at the end of the BODY element of the page. This is usually the best choice. It ensures that the script will not execute until the content elements have been loaded by the browser.