Table of Contents


Working with requests

You can use the Magentrix built-in utility method to access the request information on your Active Pages.

Example of a page address in the portal:

https://portal.mycompany.com/aspx/mypage?id=xxx


The below example shows various methods available to get more information about the above URL:

var req = $.request();
var idParam = req.queryString["id"];

//this returns: https://portal.mycompany.com
var domain = req.domain;

//this returns: portal.mycompany.com
var host = req.host;

//this returns: https://portal.mycompany.com/aspx/mypage
var uri = req.uri;

//this returns: https://portal.mycompany.com/aspx/mypage?id=xxx
var source = req.source;

//this returns: /aspx/mypage?id=xxx
var relative = req.relative;