Go to page content

Actions

Attach AJAX and jQuery handlers to HTML elements and events.

Actions are the basis of all interactivity on a Zotonic web page.

Actions can be connected to HTML elements or Javascript events using the {% wire %} scomp.

Actions range from a simple jQuery "show" to Ajax postbacks that can trigger many other actions. The server also replies to a postback or Comet push with actions to be executed on the browser.

Search the documentation

  • add_class

    Add a class to an element.

  • alert

    Show a javascript alert.

  • confirm

    Show javascript confirm.

  • dialog

    Show a dialog.

  • dialog_close

    Close the currently open dialog.

  • dialog_open

    Open a dialog rendered from a template.

  • disable

    Disable an element.

  • enable

    Enable an element.

  • event

    Bind actions to a jQuery event or submit a form.

  • fade_in

    Show an element by animating the opacity.

  • fade_out

    Hide an element by animating the opacity.

  • growl

    Show a growl like message.

  • hide

    Hide an element without any animation.

  • insert_bottom

    Inserts HTML after the contents of an HTML element.

  • insert_top

    Inserts HTML before the contents of an HTML element.

  • logoff

    Log off the current user.

  • mask

    Place a mask over an element.

  • moreresults

    Show more results of the current search query inline on the page.

  • notify

    Send a zotonic notify message. All modules which observe this message are…

  • postback

    Send an event to the server.

  • redirect

    Redirect to another page.

  • reload

    Reload the current page.

  • remove_class

    Remove a class from an element.

  • reset

    Resets a form.

  • script

    Execute a Javascript.

  • set_value

    Set the value of a form field.

  • show

    Show an element without any animation.

  • slide_down

    Show an element by animating the height.

  • slide_fade_in

    Show an element by animating the height and opacity.

  • slide_fade_out

    Hides an element by animating the height and opacity.

  • slide_up

    Hide an element by animating the height.

  • submit

    Submit a form.

  • toggle

    Toggle the visibility of an element.

  • toggle_class

    Toggle a class from an element.

  • typeselect

    Show possible selections whilst typing.

  • unmask

    Remove a mask placed over an element with mask.

  • update

    Replace the contents of an HTML element.

  • with_args

    Apply actions with arguments added.