-
Notifications
You must be signed in to change notification settings - Fork 25
/
rsv_file.html
54 lines (44 loc) · 1.85 KB
/
rsv_file.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
layout: default
navPage: docs
heading: Including rsv.js
breadcrumbs:
- Tutorials,/tutorials/
- Adding JS validation to your forms,/tutorials/js_validation/
- Including rsv.js
prev: The example form,/tutorials/js_validation/example_form/
next: Defining your validation rules,/tutorials/js_validation/rules/
categories: tutorial
tags: validation
---
{% include open_section.html nav='nav_tutorial_js_validation.html' selected='rsv_file' nav_width=4 %}
<p>
Before starting work on adding the validation rules, we first need to include the library
in your webpage. Since Form Tools already has it bundled with its own files, you just need
to locate it and point to it on your server. You can find the file at this location:
</p>
<p>
<b>[form tools root]/global/scripts/rsv.js</b>
</p>
<p>
The "[form tools root]" is the folder of wherever you installed Form Tools.
</p>
<p>
You can include the file by either a "relative" or "absolute" link. A relative link is linking
to something <i>in respect to the location of the current file</i>. So, if you were to move
your files around, you would need to update the relative links each time. An absolute link
would be the full URL to the file. This would never change, regardless of what file is
doing the including. Here's an example of both:
</p>
{% codemirror html %}
<!-- RELATIVE. this goes two folders up, then down into the global/scripts folder -->
<script type="text/javascript" src="../../global/scripts/rsv.js"></script>
<!-- ABSOLUTE -->
<script type="text/javascript" src="http://www.yoursite.com/formtools/global/scripts/rsv.js"></script>
{% endcodemirror %}
<p>
You'll need to add one of those lines - with the paths adjusted for your own file locations
on your server in the top of your webpage, in between the <head> and </head>
tags.
</p>
{% include close_section.html %}