IPLugin -The IPL Netscape Plugin for The Internet Psychology Laboratory 

Table of
Contents
Introduction
Overview of Creating an Experiment
Using Forms to Define an Experiment
Setting up the Html File


Introduction

The IPLugin Netscape plugin is an add-on module to the Netscape Navigator (under Win95 only) which supports the creation of reaction time experiments which can then run on the Web. The plugin is downloaded from the Internet Psychology Laboratory (IPL) site and installed on the client hard disk. The plugin then becomes part of the Netscape Navigator. Then, the experimenter may create reaction time experiments which can be stored in a file and downloaded from a URL for execution. Sometimes, creation of an experiment will require that image or audio files be added to the ipl plugin installation.

The experiment is defined within a "sequence" file, which has a file name extension ".seq". When a file with this file name extension is embedded within an html file (using the "<EMBED>" tage) Netscape automatically loads the ipl plugin. The plugin then reads in the sequence file and configures itself according to the data defined within that sequence file.

Typically, a simple table will be included within the html file which contains a button called "start". This start button is linked to the plugin "start()" method through a one line live-connect Javascript instruction. It's quite simple, and can be cut and pasted from one experiment html page to another.

This document will take the experimenter through the process of setting up, creating, and delivering an experiment over the Web. It will also cover installation of the IPL plugin.

Return to Table of Contents


Overview of Creating an Experiment

IPLugin supports the creation and delivery of reaction time experiments over the Web. Each experiment is defined by a set of text files with the extension .seq.  We have provided a series of forms to help generate these files, which are then placed on a Web server, with explanatory .html files, for use by the plugin.

Multiple .seq files are used to serve multiple blocks: one .seq file per block. In addition, a separate .seq file is used to serve the instructions which precede an experiment.

The first form creates a .seq file containing the experiment instructions. Each submission of the second form creates a .seq file defining one block of the experiment. You will then create an .html file which requests the instruction .seq file from the Web server. From the instruction .seq file, the plugin will be able to get the subsequent blocks of the experiment.

An experiment is delivered over the Web in the following way. First, an html file containing an embed tag indicating the name of the instruction .seq file is downloaded into the browser. Upon reading in the instruction file, the plugin configures itself as an instruction plugin, displays the instructions, and awaits the appropriate keypress from the user. Once the user makes the appropriate keypress, the first experiment block is downloaded. Once this first block is completed, subsequent blocks (if there are any) are also downloaded. Note that the experimenter only needs to embed the name of the first file (the instructions .seq file); the name of the subsequent .seq file is embedded in the description of each block.

In the following sections, we will step through the process of creating and delivering an experiment.

Return to Table of Contents


Using Forms to Define an Experiment

The instruction file is the first file served by the plugin, and contains information about the experiment as a whole (name, type, etc.), brief instructions to the subject, and the name of the .seq file describing the first block of the experiment. This section describes the information required by the form:

When this completed form is submitted, the server creates the instruction .seq file, and returns a customized form to collect information about the blocks of the experiment. Each submission of this form creates a .seq file for one block of the experiment. The information required is:
The text field provides signal and response information for each of the trials. The number of trials (i.e. rows) should be the same as the number given in "Number of events" above. Each trial definition contains eight fields (i.e. "columns"). These are:
1 2 3 4 5 6 7 8
not used stimulus duration (sec) time between signals (sec) horiz. position /volume right channel vert. position /volume left channel correct response not used (response type) signal description
0 .03 0 .5 .5 82 0 red-50-0
  1. Currently, this field is not used, but it might be in future versions of the software.
  2. Duration of stimulus, in seconds.
  3. Length of response window: how long the program should wait between signals. If the experiment is one in which a subsequent signal should wait until after after a user responds (i.e. is defined as "Self-paced"), then this value refers to the duration between the users response and the appearance of the next signal. If, by contrast, the experiment is one in which each trial comes up automatically (i.e. is defined as "Forced-paced"), then this value refers to the duration between the start of display of one signal and the start of the immediately succeeding signal. In both cases, duration is in seconds.
  4. xPos/rdB: if this is a visual signal, then this value is the x position (normalized to between 0 and 1); if it is an audio signal, then this refers to amplitude of the signal, in DB, of the right speaker channel
  5. yPos/ldB: if this is a visual signal, then this value is the y position (normalized to between 0 and 1); if it is an audio signal, then this refers to amplitude of the signa, in DB, of the left speaker channel
  6. Correct response; this is an integer. It can be converted to a character.
  7. Response "type": currently this is a free variable.
  8. Signal Data: this field is variable and can have up to three different subfields. The number of subfields, and the meaning of each subfield is dependent on the type of the experiment.

  9. The most complicated setup comes with "TEXT" type experiments. For a text experiment there can be from one to three subfields. Each subfield is separated by a "-". Each subfield has the following meaning: If the experiment type is "AUDIO", or "IMAGE", then there is only a single field which indicates the name of the audio (.wav) or image (.bmp) files. If the experiment type is "AUDIO+IMAGE", then there are two subfields, again separated by a "-". The first field is the name of the audio file and the second field is the name of the image file.

    Return to Table of Contents



    Setting up the Html File

    Once the .seq files have been set up, the user needs to create an .html file to contain it. We can't get into creating html files here: we will only talk about what you need to do to embed your experiment into an html file.

    The following is a kind of "template" .html file. You can use this as the basis for your own .html files.

    <HTML>
    <HEAD>

    <TITLE>IPLPlugin Test Audio</TITLE>

    </HEAD>
    <BODY>

    <H1> Stroop Experiment </H1>
    <Br>
    <Br>

    <HR>
    To start the experiment, click on the "Start" button.
    <br>
    <br>
    <CENTER>
    <EMBED SRC="testaudio.seq"
    ALIGN=CENTER
    WIDTH=300
    HEIGHT=300
    NAME ="iplPlugin" pluginspage=
    "www.ipsych.com/plugins/
    getPlugin.html"

    >
    <P>
    </CENTER>

    <form>

    <input type=button
    onclick="document.iplPlugin.Start();"
    value=Start>

    </form>

    </BODY>
    </HTML>

    There are two areas of concern in this .html file. The first area is the EMBED tag. The embed tag tells the browser to load a plugin in order to download a file. The SRC field indicates the name of the file. The ALIGN field tells the browser whether to center or align left or right the display of the plugin. WIDTH and HEIGHT indicate the dimensions of that display. The NAME is used later in the html file (under the "form" tag, which we will discuss in a moment). The "pluginspage" defines a URL of an html page to be downloaded into the browser in the event that the IPL plugin is not currently installed on the client machine. This html page is automatically downloaded if the plugin matching the file extensions .seq is not found.

    The second section of interest here is the "form" tag. Here we will define a single button which, when clicked, executes a little single-line javascript script. The "type" field indicates the type of item--in this case a button. The "onclick" field defines a javascript script to be executed when the button is clicked. In this case, the javascript script is a single line script which tells the browser to call a function, called "Start()" within the plugin whose name is defined somewhere within the html file. In this case, the name is "iplPlugin" and it is defined above within the EMBED tag.

    Return to Table of Contents


    ©1997 Internet Psychology Lab