Copyright 2008 Shoptalk Systems

CHECKBOX #handle, labelExpr$, setting

The CHECKBOX statement adds a checkbox object to the web page at the current position.  The checkbox object is assigned to the variable named #handle.  The labelExpr$ is used to give the link a text label.  Turn the checkbox initially on or off with the setting value, either nonzero or zero.

When the link  is clicked, the name of the handle variable is assigned to the global variable EventKey$.  If the handler is a named sub, then the name of the handler is passed into the sub as a string parameter.


  global #optIn
  checkbox #optIn, "Check this to opt-in", 0
  button #accept, "Accept", accept

sub accept handle$
  if #optIn value() then
    print "Set"
    print "Cleared"
  end if
end sub