I have issue with delphi activex control. I create acitvex library and then activex form. I define one function and i want to call this function from javascript. But i can't javascript trow error "Object doesn't support property or method 'Method1'".
This is HTML code:
This is delphi code *.ridl file
interface IGetDocs: IDispatch { [id(0x000000E8)] HRESULT _stdcall Method1(void); };
this is *_TLB.pas file
IGetDocs = interface(IDispatch) ['{8F2BF1C6-98A5-4D6B-A43E-890698A3C91D}'] procedure Method1; safecall; end;
and this is file with implementation
unit GetDocsU; {$WARN SYMBOL_PLATFORM OFF} interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ActiveX, AxCtrls, GetDocs_TLB, StdVcl, Vcl.StdCtrls, ShellApi, Vcl.XPMan, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP; type TGetDocs = class(TActiveForm, IGetDocs) protected procedure Method1; safecall; public { Public declarations } procedure Initialize; override; end; implementation uses ComObj, ComServ; {$R *.DFM} procedure TGetDocs.Method1; begin MessageDlg('HI from active x', mtInformation, [mbOK], 0, mbOK); end; end.
This is javascript:
Can anyone help with this issue. I try to move method in public section in published section without success. I try also to register activex control with regsvr32 and from delphi IDE but got same error