Picklist for convenient user interaction code
Description and API
Typically used for drop-down lists, checkboxes and radio button controls. Simple and flexible
to use: One or two array constructor, generate HTML method, look-up string from index or index
from string methods.
var DIR_N = 0;
var DIR_E = 90;
var DIR_S = 180;
var DIR_W = 270;
var directionsList = new PICKLIST(['North','East','South','West'],[DIR_N,DIR_E,DIR_S,DIR_W]);
var htmlToShow = directionsList.ChecksHtml([['West',90'],'directions','<br>');
Demonstrate and exercise
- testpicklist.js is included in the download package as an example of usage.
It won't work straight out of the box as it needs jQuery and styling.
Red results indicate failed tests.
Error messages are often the correct response.