Please enable JavaScript to view this site.

Navigation: Advanced topics

How to add external files

Scroll Prev Next More

 

Follow the instructions below to add your files with JavaScript/CSS/ASP code to the project.

Copy your files to the project folder

Copy your files to the source folder in the project directory (e.g., ..\Documents\ASPRunnerProProjects\Project1\source). Organize the files into subfolders if needed.

 

For example, you want to add images right.png and wrong.png to the images folder, a new HTML template quiz.htm to the templates folder, and a simple CSS file quiz.css. To perform this:

 

Create the folder called images inside the source folder and copy the images right.png and wrong.png there.

Create the folder called templates inside the source folder and copy the file quiz.htm there.

Copy the file quiz.css directly into the source folder.

 

When building the project, all files from the source folder are copied to the output folder while keeping the structure of the subfolders.

Link your files to pages

JavaScript

To link a JavaScript file to a page, select the page on the Editor screen and switch to the HTML mode. Then add the following code after the <END body> tag:

 

<script type="text/javascript" src="include/customfile.js"></script>

 

Note: for Add/Edit/View pages shown in a popup, add the same code snippet to the List page.

 

To link a JavaScript file to all project pages, select the Header item on the Editor screen and switch to the HTML mode. Then add the code as stated above.

CSS

To link a CSS file to a page, switch to the HTML mode on the Editor screen and add your code just after the following line:

 

<link REL="stylesheet" href="style.css" type="text/css">

 

To link a CSS file to all project pages, select the Header item on the Editor screen and switch to the HTML mode. Then add the code as stated above.

ASP

It is recommended to use events to add your ASP code. Add the following code to the After table initialized event to link an ASP file to a page or After application initialized event to link an ASP file to all pages:

 

asp_include "encrypt.asp",false

 

See also:

Editor screen

Editing the <head> section

Event editor

AfterTableInit

AfterAppInit