Async Event HandlingLast Updated: 5/7/2009 | |
| Sections above here: Home » Development » Ajax | |
|
Sections below here: Topics in this section: |
Advanced Async Event HandlingImplementing Asynchronous events with IntraWeb is plain and easy. Just hook some Pascal (or C++) code to any of the OnAsync Event handlers and you are done. The Advanced Ajax Events demo shows how to call Async events from your custom JavaScript routines and how to implement an asynchronous Key event handler.This is all you need to Ajax-enable your IntraWeb application: procedure TIWForm2.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);
Very simple, but what if you want to call async events from your own custom JavaScript? How to connect key events to some async IntraWeb handler? This is the Delphi side of an async event handler, that listens to CTRL-A in the Web browser: procedure TIWForm2.IWAppFormCreate(Sender: TObject);
The code in the Form’s JavaScript property implements the JavaScript side and shows how to call a “CallBack” (aka Delphi Async event handler) manually: function KeyDownHandler(event){
|
(C) 2002-2009 - Atozed Software Ltd. | |