Anyone who can write an APL function should be able to host it on the web.™
Rendered webpage |
APL code |
:Class jqButtonsetSimple : MiPageSample
⍝ Control:: _JQ.jqButtonset
⍝ Description:: Grouped sets of buttons
∇ Compose;output;fw;menu;form
:Access Public
form←Add _.Form
TEXTS←'Shoes' 'Boots' 'Sandals' 'Flip-Flops'
fw←'footwear'form.Add _.jqButtonset(TEXTS'radio')
fw.Legend←'Footwear'
menu←'menu'form.Add _.jqButtonset(('?' 'GO')'button')
menu.Legend←'Menu'
output←'#output'Add _.p
⍝ Form data is serialized by default...
Add _.Handler'#menu_1' 'click' 'Help' ⍝ no need for it here,
Add _.Handler'#menu_2' 'click' 'Go' ⍝ but we do need it here...
∇
∇ r←Go;footwear
:Access public
⍝ ... so we can get it down here:
footwear←⍬ Get'footwear'
:If 0∊⍴footwear
r←'#output'Replace'You can''t go barefoot!'
:Else
r←'#output'Replace'You selected: ',footwear⊃TEXTS
:EndIf
∇
∇ r←Help
:Access Public
r←'#output'Replace'Please select footwear, then click <b>Go</b>.'
∇
:EndClass