Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Note unsupported


Warning
titleEngine Compatibility
replace_inner is not supported by the Node engine.

replace_inner(<sel>, <expr>)

Replace the contents of the page element with the id given by <sel> with content given by the result of evaluating the expression (a string, var, extended quote, or string concatenation).

Code Block
languagejavascript
themeConfluence
languagejavascript
replace_inner("#foo", "This is the text")

The following ruleset shows replace_inner() being used

Code Block
languagejavascript
themeConfluencelanguagejavascript
ruleset a1299x184 {
	meta {
		name "Replace Inner Example"
		author "nathan cerny"
		logging off
	}
	dispatch {
		// domain "exampley.com"
	}
	rule first_rule {
		select when pageview ".*" setting ()
		replace_inner("#replace", "The content has been replaced.");
	}
}

...