Sawtooth Software: The Survey Software of Choice

Using Arrow Buttons to Navigate Survey

I'm using SSI Web 8 and I would like to map the keyboard arrows so that the right arrow advances to the next page and the left arrow goes to the previous page. How is this done?

This requires a little jQuery programming to alter the default functionality of a SSI Web survey. In this case you need to add an event listener that monitors the keyboard for a specific key press. If the right arrow button is pressed, it executes the SSI_SubmitMe() function. If the left arrow button is pressed, it executes the SSI_GraphicalPreviousSubmit() function. Drop the following code into the page where you want to map the arrow buttons to the previous and next functions; or, if you want it applied globally, place it into the Survey Settings » Headers and Footers » HTML <head> Tag section.

<script>
  $(document).keydown(function (e) {
    switch(e.which) {
    case $.ui.keyCode.LEFT:
      SSI_GraphicalPreviousSubmit();
      break;

    case $.ui.keyCode.RIGHT:
      SSI_SubmitMe();
      break;

    default:
      return; // allow other keys to be handled
    }

    // prevent default action (eg. page moving left/right)
    // but consider accessibility (eg. user may want to use keys to choose a radio button)
    e.preventDefault();
  });
</script>

By the way, here are the other key codes you can use with the jQuery.ui.keyCode function:

  • BACKSPACE
  • COMMA
  • DELETE
  • DOWN
  • END
  • ENTER
  • ESCAPE
  • HOME
  • LEFT
  • PAGE_DOWN
  • PAGE_UP
  • PERIOD
  • RIGHT
  • SPACE
  • TAB
  • UP

Sawtooth Software

6:30 AM to 5:30 PM Mountain Time
(GMT-6; GMT-7 Autumn/Winter)
Monday through Friday

Phone: +1 801 477 4700
Fax: +1 801 434 5493
Email: support@sawtoothsoftware.com

SKIM Software

9:00 AM to 5:30 PM Central European
(GMT+2; GMT+1 Autumn/Winter)
Monday through Friday

Phone: +31 10 282 3500
Fax: +31 10 282 3560
Email: software@skimgroup.com
Online: www.skimgroup.com

We're open!

Lighthouse Studio

Lighthouse Studio is our flagship software for producing and analyzing online and offline surveys. It contains modules for general interviewing, choice-based conjoint, adaptive choice-based conjoint, adaptive choice analysis, choice-value analysis, and maxdiff exercises.

Try Lighthouse Studio

  Buy Lighthouse Studio