Visual analogous scales

Ratingscales is a javascript library to create visual analogous response scales (VAS) in online surveys.

Different forms of scales can be created:

  • VAS in form of a clickable line
  • VAS in form of a slider
  • VAS in form of a button scale
  • Optionally the continuous scale can be divided into a limited number of categories

1. Change Log

Note: Outdated script!

The script is not maintained anymore. There are however more sophistacted alternatives, e.g. a corresponding jQuery plugin offering comparable functionality.

2. Disclaimer

The script does not work properly in some browser on linux and apple. As I don´t have access to these operating systems I cannot reproduce and fix these errors.

The precision of the scale is slightly limited and can vary from browser to browser in the range of one to two pixels.

3. License

Ratingscales is available under the GNU General Public License. It implements the javascript library wz_dragdrop.js by Walter Zorn published under the GNU GPL as well.

4. Installation

  1. Include "wz_dragdrop.js" and "ratingscales.js" directly AFTER the opening <body> tag:
    <script type="text/javascript" src="wz_dragdrop.js"></script>
    <script type="text/javascript" src="ratingscales.js"></script>
  2. Include the following line BEFORE the closing </body> tag:
    <script type="text/javascript">scales.init();</script>
  3. Create your scales by calling the function "scales.scale()". This function accepts up to 6 arguments:
    1. Name of the variable (= hidden form element) (required!)
    2. Type of scale ('click', 'slide' or 'button') (optional)
    3. Number of classes (optional)
    4. Settings for the image of the scale, e.g. 'scale.gif' (source, width and height) (optional)
      Note: as string (takes source and uses default width/height)
      or: as array, e.g. ['scale.gif', 100, 12] (sets source, width and height)
    5. Settings for the image of the slider, e.g. 'cross.gif' (source, width and height) (optional)
      Note: as string (takes source and uses default width/height)
      or as array, e.g. ['cross.gif', 100, 12] (sets source, width and height)
    6. Scale labels as a 2-dimensional array (optional)
  4. Change the default settings (optional):
    • scales.scale_src: image source of scale
    • scales.scale_width: width of scale
    • scales.scale_height: height of sclae
    • scales.cross_src: image source of slider
    • scales.crossOv_src: image sourc of active slider
    • scales.cross_width: width of slider
    • scales.cross_height: height of slider
    • scales.classes: number of classes
    • scales.mode: type of scale ('click', 'slide' or 'button')
    • scales.slide_clickable: make slider scales clickable

Note: Some functionality is experimental (e.g. classes). There is no guarantee whatsoever the script works as intended. Use it on your own risk.

5. Demonstration

Some examples using this scripts are shown on the demonstration page (in german).

6. Literature

Logo AmazonGnambs. T. (2008). Graphische Analogskalen in Internet-basierten Fragebögen. München: Akademischer Verlag.

7. Download

Download script

Zuletzt geändert: 2009-07-21 09:35:25

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

By submitting this form, you accept the Mollom privacy policy.
Facebook Delicious
LinkedIn Google JKU
XING
Logo Selmar GnambsCreative CommonsDrupal