Ik heb een ActiveX applicatie geschreven in Delphi 7 die geopend wordt in een HTML bestand.
Nu haal ik met Delphi een param op uit het HTML bestand.
Maar nu wil ik dat de applicatie een Javascript functie aanroept. Gewoon zoals dit:
Maar hoe kan Delphi deze aanroepen?
Ik heb het stuk op Delphi3000 gelezen waar staat:
Nu haal ik met Delphi een param op uit het HTML bestand.
Maar nu wil ik dat de applicatie een Javascript functie aanroept. Gewoon zoals dit:
code:
1
2
3
| function save(){
alert('test');
} |
Maar hoe kan Delphi deze aanroepen?
Ik heb het stuk op Delphi3000 gelezen waar staat:
Ik heb de event toegevoegd, en het stukje code aan bv een knop toegevoegd maar dan krijg ik, Undeclared identifier 'OnSubmit'. Wat ik ook niet vreemd vindt want waar moet hij deze opeens vandaan halen? Zowiezo snap ik het stukje code niet echt.Add an Event:
Open the Event section in the outline and right click. Select the New | Method option. Give the Method a name like OnSubmit.
Lets say you want to assign a button click on the form with the new event. Insert the following code under the button click procedure.
procedure TActiveXtest1.ButtonSubmitClick(Sender: TObject);
begin
If FEvents <> Nil Then
Begin
FEvents.OnSubmit; // OnSubmit is the new event
End;
end;