I updated your last function:
Code: Select all
Procedure.s getURLparam(ParamName.s="")
If ParamName
!var results = new RegExp('[\\?&]' + v_ParamName + '=([^&#]*)').exec(window.location.search);
!return (results==null) ? null : decodeURIComponent(results[1]) || 0;
Else
!return window.location.search;
EndIf
EndProceduregetURLparam("arg3") will return "200"
getURLparam("arg2") will return "true"
getURLparam("arg1") will return "HELLO WORLD"
getURLparam() will return ?arg1=HELLO%20WORLD&arg2=true&arg3=200