JavaScript API

Puzzlebox Jigsaw permits the ability to control certain of its operations externally via the content being evaluated through its Web Browser component. This capability is exposed through specially-crafted JavaScript calls made from the media, web page, or application on display.

For example, if Puzzlebox Jigsaw was being used to evaluate the effectiveness of a given web sites' shopping cart experience, it might be desirable to take EEG measurements of a test user's attention and focus level while they step through the checkout process - but measurements are not necessary during the opther portions of their site visit. This can be accomplished by the website making the JavaScript call jigsawJavaScript.eegStart() at the start of checkout and jigsawJavaScript.eegStop() after its completion. These programming calls will pass through to Puzzlebox Jigsaw's Web Browser component and activate the software accordingly. It is even possible to automatically save or export this data to a file on the host computer without interrupting the test user in any way.

Command Syntax

JavaScript Call Description Example
jigsawJavaScript.sessionReset() Reset Session Data <a href="#" onclick="jigsawJavaScript.sessionReset()">Reset</a>
jigsawJavaScript.sessionSave( <filepath> ) Save Session Data to File <a href="#" onclick="jigsawJavaScript.sessionSave('puzzlebox-jigsaw-session.synapse')">Save</a>
jigsawJavaScript.sessionExport( <filepath> ) Export Session Data to CSV <a href="#" onclick="jigsawJavaScript.sessionExport('puzzlebox-jigsaw-session.csv')">Export</a>
jigsawJavaScript.eegStart() Start EEG Processing <a href="#" onclick="jigsawJavaScript.eegStart()">Start</a>
jigsawJavaScript.eegStop() Stop EEG Processing <a href="#" onclick="jigsawJavaScript.eegStop()">Stop</a>
jigsawJavaScript.customData( <customName>, <customValue> ) Contribute Custom Data Packet to Session <a href="#" onclick="customData('Score', '100')">Custom Data</a>

Example HTML

  • HTML source available for viewing or download here
<title>Puzzlebox Jigsaw - JavaScript API Example</title>
    <h1>Puzzlebox Jigsaw</h1>
    <h2>JavaScript API Example</h2>

    <h3><a href="#" onclick="jigsawJavaScript.sessionReset()">jigsawJavaScript.sessionReset()</a></h3>
    <h3><a href="#" onclick="jigsawJavaScript.sessionSave('puzzlebox-jigsaw-session.synapse')">jigsawJavaScript.sessionSave('puzzlebox-jigsaw-session.synapse')</a></h3>
    <h3><a href="#" onclick="jigsawJavaScript.sessionExport('puzzlebox-jigsaw-session.csv')">jigsawJavaScript.sessionExport('puzzlebox-jigsaw-session.csv')</a></h3>

    <h3><a href="#" onclick="jigsawJavaScript.eegStart()">jigsawJavaScript.eegStart()</a></h3>
    <h3><a href="#" onclick="jigsawJavaScript.eegStop()">jigsawJavaScript.eegStop()</a></h3>

    <h3><a href="#" onclick="jigsawJavaScript.customData('Score', '100')">jigsawJavaScript.customData('Score', '100')</a></h3>

Last modified 10 years ago Last modified on 03/21/12 13:47:28