Javascript in VROOM

Javascript Files

Javascript Files are managed as Includes as they are snippets of code which may be included in a template. However accessing them requires you to link directly to them via a 'virtual path'.

First of all, you can create your Javascript in the Template menu of the administrator portal. Click Javascript from the menu, then Add Javascript, then create a reference with the extension (e.g. my-style.css), and then click Save Changes.

NOTE: With Javascript you must add the relevant extension (e.g. .css or .js), otherwise the system will think that the code is a regular Include.

Once you have created your CSS or Javascript you can include it as you would normally through HTML using the following path:

For CSS use: /css/REFERENCE.css For Javascript use: /js/REFERENCE.js

An example below is taken from a header include which references both CSS and Javascript:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="/css/my-style.css" />
    <script type="text/javascript" src="/js/my-javascript.js"></script>
<!-- end header -->