rk.JS.vars | R Documentation |
Define variables in JavaScript code
rk.JS.vars( ..., var.prefix = NULL, modifiers = NULL, default = FALSE, join = "", check.modifiers = TRUE, getter = "getValue", guess.getter = FALSE, object.name = FALSE, methods = "" )
... |
Either one or more character strings (the names of the variables to define),
or objects of class |
var.prefix |
A character string. will be used as a prefix for the JS variable names. |
modifiers |
A character vector with modifiers you'd like to apply to the XML node property. |
default |
Logical,
if |
join |
A character string,
useful for GUI elements which accept multiple objects (e.g., multi-varslots).
If |
check.modifiers |
Logical,
if |
getter |
A character string,
naming the JavaScript function which should be used to get the values in the
actual plugin. Depending on the XML element, |
guess.getter |
Logical,
if |
object.name |
Logical,
if |
methods |
An optional character vector of method calls to append to the getter function
(see |
An object of class rk.JS.var
.
To get a list of the implemented modifiers in this package see modifiers
.
rk.JS.array
,
echo
,
id
,
modifiers
,
rk.JS.method
and the Introduction to Writing Plugins for RKWard
# create three checkboxes checkA <- rk.XML.cbox(label="Run Test A", value="A") checkB <- rk.XML.cbox(label="Run Test B", value="B") checkC <- rk.XML.cbox(label="Run Test C", value="C") # define them by their ID in JavaScript cat(rk.paste.JS(rk.JS.vars(list(checkA, checkB, checkC))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.