rk.XML.logic | R Documentation |
This function will create a logic section with "convert", "connect", "include", "insert",
"external" and "set" nodes.
You can also include JavaScript code to use the locig scripting features of RKWard,
if you place it in a comment
with rk.comment
: Its contents will automatically be placed inside a
<script><![CDATA[ ]]></script>
node.
rk.XML.logic(...)
... |
Objects of class |
An object of class XiMpLe.node
.
rk.XML.convert
,
rk.XML.connect
,
rk.XML.external
,
rk.XML.set
,
rk.XML.switch
,
and the Introduction to Writing Plugins for RKWard
# define an input field and two checkboxes test.input <- rk.XML.input("Type some text") test.cbox1 <- rk.XML.cbox(label="Want to type?", value="true") test.cbox2 <- rk.XML.cbox(label="Are you shure?", value="true") # now create some logic so that the input field is only enabled when both boxes are checked test.convert <- rk.XML.convert(c(state=test.cbox1,state=test.cbox2), mode=c(and="")) test.connect <- rk.XML.connect(governor=test.convert, client=test.input, set="enabled") test.logic <- rk.XML.logic(test.convert, test.connect) cat(pasteXML(test.logic)) # with only one checkbox, you can directly query if it's checked test.connect2 <- rk.XML.connect(governor=test.cbox1, client=test.input, set="enabled") test.logic2 <- rk.XML.logic(test.connect2) cat(pasteXML(test.logic2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.