Thanks Alexandre, it's work now.
I add comment for it.
(Hope this forum support monospaced font)
--------------------------------------------
implementation
{$R *.dfm}
var user_TZOS : string; // for global used
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
HIDDEN_TZOS_EDIT.Text := 'No Changed';
user_TZOS := 'No Changed';
// On Create, run the javascript and DISPLAY UnControllable ajax value to EDIT field (Its not real value in EDIT.TEXT)
// (The FIELD NAME must all Upper case characters)
Self.JavaScript.Add('document.addEventListener("DOMContentLoaded", function() {' + sLineBreak +
'var d = new Date();' + sLineBreak +
'var tn = d.getTimezoneOffset();' + sLineBreak +
'document.getElementById("HIDDEN_TZOS_EDIT").value = tn;' + sLineBreak +
'});');
// Make an event call to FIRE 'AJAX_Func' function, by Pre-Defined Tstrings(use of Javascript) "timeZoneOffset" variable
IWButton1.ScriptEvents.HookEvent('onclick', 'ajaxCall("AJAX_Func", "timeZoneOffset=" + IW.$("HIDDEN_TZOS_EDIT").value);');
// Registed ajax function and define Converting Procedure
WebApplication.RegisterCallBack('AJAX_Func', procedure (aParams: TStrings)
begin
// Let the EDIT.TEXT display value to be real controllable
HIDDEN_TZOS_EDIT.Text := aParams.Values['timeZoneOffset'];
user_TZOS := aParams.Values['timeZoneOffset'];
end);
end;
procedure TIWForm1.IWButton2AsyncClick(Sender: TObject; EventParams: TStringList);
begin
Webapplication.ShowMessage('HIDDEN_TZOS_EDIT : ' + HIDDEN_TZOS_EDIT.Text);
Webapplication.ShowMessage('Global variable user_TZOS : ' + user_TZOS);
end;
-----------------------------------------------
More ! For remark...
HTTP.sys isn't compatible with the ASP.NET Core Module and can't be used with IIS or IIS Express.
https://docs.microsoft.com/en-us/aspnet/...etcore-2.2
Hope no need to touch that
https://support.microsoft.com/en-us/help...or-windows
(My IIS uninstallation may be not clear enough, still finding out how)