Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This function is a shortcut for getElementValue(), trimmed. It is used to retrieve an element’s value by its id and trim the leading and trailing spaces from that value.

Parameters:

  • id or DOM reference to element – identifies the element to retrieve the value from

Example:

var value = get("TextBox1");

Example 2:

Suppose you have an element in your HTML page with the id, "header". You could set the background image of the header depending on the value of a particular output field:

if( get("D_8_30") == "M"){
  var header = getObj("header");
  header.style.backgroundImage = 'url("/images/logo.png")';
  header.style.backgroundRepeat = "no-repeat";
}
  • No labels