chickadee » html-utils » combo-box

(combo-box name options #!key default id first-empty onchange onkeyup disabled length multiple selectedindex size tabindex type class) procedure

Generates an HTML combo box using <select> and <option> tags. The keyword parameters id, onchange, onkeyup, disabled, length, multiple, selectedindex, size, tabindex, type and class are passed to the <select> procedure (from html-tags). default is the value from the list of options to be selected. If first-empty is #t, the first option of the combo box will be empty.

Example:

(combo-box "test" '(#(1 1) #(2 2) #(3 3)) first-empty: #t default: 2)

Produces:

"<select name='test' id='test'><option></option><option value='1'>1</option><option value='2' selected>2</option><option value='3'>3</option></select>"