Copyright 2008 Shoptalk Systems
BUTTON #handle, labelExpr$, handler
The BUTTON statement adds a button object to the web page at the current position. The button object is assigned to the variable named #handle. The labelExpr$ is used to give the button a text label. The handler is either the name of a branch label, or the name of a sub.
When the button 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.
'add a button which will call a
button #one, "One", [oneClicked]
'add a button which will call a scoped subroutine
button #two, "Two", twoClicked
print "One was clicked!"
sub twoClicked handle$
print "Two was clicked!"
BUTTON object methods
#handle CSSCLASS() - Set the CSS class tag
#handle SETKEY(stringExpr$) - Set the link's event key to stringExpr$
#handle SETID(expr$) - Set the HTML id property to be the value of expr$
#handle ISNULL() - Returns zero (or false)
#handle DEBUG$() - Returns the string "Link"