![]() |
|
Delphi code not executing when called from Javascript on Chrome, Edge 15.2.36 - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Delphi code not executing when called from Javascript on Chrome, Edge 15.2.36 (/thread-2869.html) |
Delphi code not executing when called from Javascript on Chrome, Edge 15.2.36 - defaultuser - 09-20-2022 Hello,
on the 'res = win1.functionwithinDelphi(acctnbr, reqid);' line is where the Delphi code is to executed, however, it does not work on Chrome or Edge. Is there a workaround for this?
We have code that after clicking a link with parameters, the user is directed to javascript code that redirects them to their already open instance of the Delphi project, updated with parameters from the link they clicked on. However, after stepping into the code that calls the Delphi function and inspecting the res variable it is null, and I am not able to trace it into Delphi. Below is a sample of the Javascript code. Code: function pageInit() {RE: Delphi code not executing when called from Javascript on Chrome, Edge 15.2.36 - joelcc - 09-21-2022 You probably have a javascript bug. Try using something like jitterbug to find the javascript error. RE: Delphi code not executing when called from Javascript on Chrome, Edge 15.2.36 - Alexandre Machado - 09-22-2022 Not sure if I follow... I don't think this would ever work the way you intend it... Anyway, it would be easier if you can submit a simple test case showing the issue. RE: Delphi code not executing when called from Javascript on Chrome, Edge 15.2.36 - davismark - 09-03-2026 This looks like a browser security/compatibility issue rather than a Delphi problem. Modern Chrome and Edge no longer support calling arbitrary functions in another window the way older browsers did. You may need to replace this JavaScript-to-Delphi call with a supported communication mechanism, such as postMessage or a URL/API-based approach. |