« - »

Configuring your own data picker

2 March 2008

Setting up your own data picker is as simple as creating your own configuration Javascript file and providing a corresponding XML data source. A data picker configuration script contains a single function, standardSetUp, which sets the value of a number of variables used by the pop-up selection window:

Also, the default configuration of the data picker is to provide the “Starts with” search option, but to hide the “Contains” option. If you want your picker to include the “contains” search, you need to reveal that section of the screen with the following code:

document.getElementById("containscol").style.visibility = 'visible';
document.getElementById("containscol").style.display = '';

An example of a working configuration script can be found with the demo page artifacts in the file cyselect.js.

By convention, calling the pop-up window with the query string parameter “id” set to some value (such as “cy”) will cause the page to attempt to load a script named “<id-value>select.js”. Alternatively, you can pass the query string parameter “js” set to the full URL of your configuration script.


http://blog.restafarian.org/2008/03/configuring-your-own-data-picker/

Comments are closed.

Sorry, the comment form is closed at this time.