Friday, February 13, 2009

Trigger onChange immediately for checkboxes, radiobuttons and comboboxes in the Client

This was a new discovery for me. I mostly work on web applications, but the last week, I've been working in the Client exclusively.



When changing a setting on a combobox, I caught sight of the above setting, "Run Exiting/OnChange events after value change". This little gem changes the behavior of comboboxes, checkboxes and radiobuttons, so that the OnChange/Exiting events fires immediately after the user has changed the value, instead of having to wait until the field loses focus.

The setting is a per field setting, so you can mix and match according to your needs.

11 comments:

Michelle said...

I only just discovered this a couple of weeks ago also.

I think you stop looking at the properties box after a while, and don't notice when they slip in something new.

What is wierd, is you can enable this for time controls, but not calendar controls

TexasSwede said...

Any idea in what version this was added? In R5 (which I still am forced to use), this setting is not available.

janeg said...

Just an FYI, the OnChange() event code will run when the value changes AND when the field loses focus; the behaviour can trip you up sometimes if you're not aware of it.

Tommy Valand said...

@TexasSwede: I'm not sure. Maybe 6 or 6.5..

@janeg: The bug you mentioned was fixed in Notes 7.0.3/8.0.1

rob.vandenheuvel said...

Add a combobox-field to your Notes-form with the option "Allow values not in list" selected (no need to specify any choices). With code in the onChange-event you can build your own autosuggest function.

Ronnie said...

Thanks. You save my extra 1 man-day job. Xie-Xie(Thank you in mandarin).

Naveen Maurya said...
This comment has been removed by the author.
Naveen Maurya said...

very useful tip.... didnt know that such thing existed

did some research on this have posted it on my blog

http://nvn-lotus-domino.blogspot.com/2010/06/some-time-back-we-had-problem-where-we.html

Anonymous said...

It is till useful. Thanks!

Anonymous said...

Very useful comment and saved my lot of time...Thanks a lot :-) :-) :-)

Ravindra N Mahendrakar said...

Ravindra MN
Thanks guys you saved my day..
I searched for the more then a day on net.. But got nothing. Your simple trick made my day.
Thankyou very much.