Replace HTML

replace_html(<sel>, <expr>)

Replace the page element (usually a <div>) with the id given by <sel> with content given by the result of evaluating the expression.

replace_html("#foo", "<p>This is the text</p>")
This HTML will be replaced by an HTML string when the demo application is run.


See this action in action!

ruleset a60x122 {
  meta {
    name "Replace HTML Example"
    author "Mike Grace"
    description <<
      Replace HTML Example for documentation
    >>
    logging on
  }
  dispatch {
    domain "docs.kynetx.com"
  }
  rule replacing_your_html is active {
    select using "http://docs.kynetx.com/krl/kynetx-rule-language-documentation/actions/replace-html/" setting ()
    replace_html("#replacement_area", "<h1>All your HTML are belong to us!</h1>");
  }
}