Retrieve a query string variable from the current page

From Market Ruler Help
Jump to: navigation, search

Retrieves the value of a Query String from the current page's query string.

string __CR.query(variable-name, default-value);

  • variable-name - The name of the query string variable to retrieve
  • default-value - If not found, return this value instead.
  • returns the string value of the query string variable

Example: For example, if the current page URL is: Then the following code: <script type="text/javascript">
document.write(__CR.query('departmentId','no department'));
Will output the text "124123" and "no department" to the current page.

See also