Url handling
This demo covers the small Tripous URL helpers. They combine path parts, read the browser base URL,
convert a URL string to a standard URL object, extract query string values, and encode
argument objects for query string or application/x-www-form-urlencoded payloads.
tp.NavigateTo() is intentionally not executed here because it would leave the demo page.
In application code it simply assigns window.location.href when the URL is not blank.
Combine path parts
tp.UrlCombine() joins two URL path parts and normalizes the slash
between them.
Base and URL object
tp.GetBaseUrl() reads the current browser origin. tp.GetUrl()
returns a standard browser URL object and accepts relative paths.
Query string parameters
tp.ParamByName() returns one parameter value. tp.GetParams()
returns a plain object and turns repeated parameter names into arrays.
Encode arguments
tp.EncodeArg() encodes one key/value pair. tp.EncodeArgs()
accepts a plain object, an array of values, or named form elements.