RedirectToUrl()
A RedirectToUrl() function will redirect a user to a specified URL that will be open in a specified target (new, current or popup window/tab). An optional confirmation prompt message can be also provided.
RedirectToUrl(url,target);RedirectToUrl(url,target,confirmText);Function arguments
Dział zatytułowany „Function arguments”- url– (String) a URL to be redirected to;
- target – (String) a redirection target window/tab. This parameter can have values ’new’, ’current’ or ’popup’;
- confirmText – (String) [Optional] an optional text for the redirection prompt. If not used, a user will not be prompted.
Return value
Dział zatytułowany „Return value”This function returns String. The RedirectToUrl() function always returns an empty string.
Examples
Dział zatytułowany „Examples”Example 1
Dział zatytułowany „Example 1”This will redirect a user to the given URL („https://www.google.com„) and will open it in a new window/tab.
RedirectToUrl("https://www.google.com","new");