Reputation: 2359
Somehow, none of the standard Events in a Notes form are operational when used in a dialogBox call (onChange, onClose). One could argue that this a feature, but for me it definitely isn't.
If workspace.DialogBox( "FilterDB", True, True, False, False, False, False, title, dlgdoc,
True, False, True ) Then
The form has a few fields and some JavaScript for the Notes client, in order to allow type-ahead in a text field. There's also a rich-text field in the form, it's only used as a transport mechanism for texts > 64Kb. And there's are a few buttons on the form that perform some transformations on the data. Two buttons are hidden, they are clicked by the JavaScript code.
It's a new form, work in progress, and in earlier incarnations of the form the Events used to work, I'm pretty sure of that. I'll try to remove some elements from the form, maybe those events will come back to life again.
Has anyone else observed this (on Notes V12), or does anyone know why many (if not all) form Events aren't triggered? Or what I can do to reactivate them?
Upvotes: 0
Views: 376
Reputation: 2359
I just discovered why the events aren't executed: I used an agent to test the DialogBox. Apparently, events aren't triggered when the dialog box isn't started from an active form.
I created a dummy form with a button that starts the dialog box, and all events work. Now, luckily, the dialog box will be called from within a form in most cases, so problem solved. Thanks!
PS I don't think it's really logical for a DialogBox to behave like this. Why shouldn't events be fired in a solitary dialog box??
Upvotes: 0