Update Action Element

Home | Getting Started | API | Elements | Actions | Validators | Handlers | Configuration Options | Advanced Guides | Troubleshooting | About

Table of Contents

1 Update Action - #update{}

The #update{} action serves as a wrapper for a handful of ways to modify the contents of a page without having to do it using wf:update, wf:insert_after, etc.

All actions that work with this

  • #update{}
  • #replace{}
  • #insert_top{}
  • #insert_bottom{}
  • #insert_before{}
  • #insert_after{}
  • #remove{}


wf:wire(my_button, #event{type=click, actions=[
  #update{target=someDiv, elements="Replace All"}
wf:wire(my_button, #event{type=click, actions=[
wf:wire(my_button, #event{type=click, actions=[
  #insert_after{target=someOtherDiv, elements=[#button{text="A new button"}]


elements - (Nitrogen Elements)
Specify a body for the action to insert, update, or replace. This attribute is ignored by #remove{}.
type - (atom)
Which update mechanism to use. Generally, it's

recommended to ignore this attribute unless you have a reason to dynamically assign which mechanism to use. By default, this is set to the same value as the action record used (so #update{}'s type attribute is set to update, while #insert_before{}'s type attribute is set to insert_before.

See Also

Date: 2014-11-12 19:51:23 CST

Author: Jesse Gumm (@jessegumm)

Org version 7.8.02 with Emacs version 23

Validate XHTML 1.0


Note:To specify code blocks, just use the generic code block syntax:
<pre><code>your code here</code></pre>

comments powered by Disqus