Retrieve a query string variable from the current page
From Market Ruler Help
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:
http://www.example.com/?productId=124123&crsource=Google&offset=20&index=1&wrap=true
Then the following code:
<script type="text/javascript">
Will output the text "124123" and "no department" to the current page.
document.write(__CR.query('productId'));
document.write(__CR.query('departmentId','no department'));
</script>