Create an external link disclaimer alert

This article details how to add an external link disclaimer alert to a Finalsite Composer site, including where to upload the script file and why it attaches in the theme's JavaScript Assets field rather than External Assets. The alert displays a warning popup whenever a visitor clicks a link leading away from the school's website.

💡 Quick answers

  • What does the script do? It displays a warning popup whenever a visitor clicks a link that leaves the site. The script detects the site name and domain on its own, so there is nothing to configure.
  • Where does the file go? Upload it to File Manager, then attach it to the theme using the green plus button in the JavaScript Assets field.
  • Why not the External Assets field? External Assets has no attach button; it is a box for pasting code or a URL from an outside service. A .js file uploaded to File Manager lives on the site, so it is attached in JavaScript Assets instead.
  • How can the right field be told apart at a glance? Paste goes in External Assets. Attach goes in JavaScript Assets or CSS Assets. If there is nothing to click and select, the field being used is the wrong one.
  • Does it need to be added more than once? Yes, if the site uses more than one theme. Each theme carries its own asset files, and so does each domain on a district site.
  • Can the popup be customized? Not through this script. It works as-is. Contact Finalsite Support about a work order for a custom look or behavior.
  • The alert is not appearing. What now? Confirm the file was selected in JavaScript Assets, click Update, then publish the homepage.

Add the script to a theme

  • Step 1: Download external-link-disclaimer.js using this button:

📥 Download the script

Download external-link-disclaimer.js

  • Step 2: Upload the file to File Manager.
  • Step 3: In Composer, open the Themes tab in the left navigation and click the theme the site uses.
  • Step 4: Scroll to the JavaScript Assets field and click the green plus button. Select the uploaded external-link-disclaimer.js file.
  • Step 5: Click Update in the bottom right corner, then publish the homepage so the script reaches the live site.
  • Step 6: Repeat steps 3 through 5 for every additional theme and domain that should display the alert.

⚠️ Important Note

This script does not go in the External Assets field, even though both fields load code into the head section of the page. The two fields work differently, and the difference is what the field lets a person do:

  • JavaScript Assets attaches a file already uploaded to File Manager, using the green plus button. There is nothing to type. This script, once uploaded, is one of those files.
  • External Assets is a text box for pasting code copied from an outside service, or a URL pointing at a file hosted elsewhere, such as a verification meta tag, a tracking pixel, or a font stylesheet link. There is no plus button and nothing to select, because nothing is being attached.

Paste goes in External Assets. Attach goes in JavaScript Assets or CSS Assets. Adding the file to External Assets instead will not produce an error; the alert simply never appears. See Composer Themes overview for what each theme asset field does.

Customizing the alert

This script works as-is and is not meant to be edited. Modifying it puts the behavior outside what Finalsite supports. Contact Finalsite Support about a work order for a custom look or behavior.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please Sign in to leave a comment if you don't see the comment box below.