the moment of updating the field value on the browser form
Posted: Wed Apr 23, 2025 10:53 am
Hi,
We have an extension with two functions:
- One sets a value to a form field
- The other reads values from the form
We set the value like this:
In the JSExtensionAfterExecute handler:
However, if we trigger the same reading a bit later (e.g., from a popup menu), everything works correctly!
So — after which event is the field actually updated?
We have an extension with two functions:
- One sets a value to a form field
- The other reads values from the form
We set the value like this:
Code: Select all
Chromium.Browser.MainFrame.ExecuteJavaScript(
Format('cim_extension.formvalue_set("%s", "%s");', [AProdatName, AValue]),
'', 0
);
Code: Select all
if (name = 'formvalue_set') then
begin
// Read values
Chromium.Browser.MainFrame.ExecuteJavaScript('cim_extension.formvalues_get();', '', 0);
end;
if (name = 'formvalues_get') then
begin
// Output the result — but the field is still empty! (even though it appears correct visually)
end;
So — after which event is the field actually updated?