Page 1 of 1

[How To] Check the available data/object for BrowserParams

PostPosted: 01 Apr 2019 15:22
by Alexander Bulei
The best & fast way to check the available data/objects/arguments for passing into delphi via BrowserParams is using the Browser Developer Console & debugger command.

Steps:

1. Open the event in IDE:
2019-04-01_14-49-12.png


2. Open the script dialog of Script property and type the debugger; command inside the function:
2019-04-01_14-50-28.png


3.Now open your app in browser and press F12 for open the developer console.

4. Execute the action which provoke that event, and developer console will pause on debugger; command:
2019-04-01_15-00-48.png


5. Now look the available objects/properties/arguments by passing the cursor on
2019-04-01_15-02-00.png


6. So, if you need to pass the "intId" value into delphi function, you should do this:

delphi code
with IWCGJQGMap3.JQGMapV3Options.Marker.Events.OnDragEnd.BrowserParams.Add do 
begin
ServerName := 'intId';
BrowserScript := 'marker.intId';
end;


and in function:

delphi code
procedure TJQGMap3Frm.IWCGJQGMap3JQGMapV3OptionsMarkerEventsDragEnd(Sender: TObject; AParams: TStringList);
var
LId: string;
begin
LId:= AParams.Values['intId'];
end;