Try our conversational search powered by Generative AI!

Håkon Nordli
Nov 25, 2015
  5721
(0 votes)

Extend Dojo's onChange event by using intermediateChanges

One of JavaScripts built-in events are 'change'. It is triggered different depending on which input type you are using. For text input it is fired when the element looses focus after its value has changed. 

Not suprisingly, onChange in Dojo works the same. However it is possible to make it fire whenever the value changes by using intermediateChanges. 

The built-in dijit property, intermediateChanges, is a part of dijit.form widgets. By default it is set to false, but when it is set to true, it fires the onChange event whenever the value of the form widget changes.  This way it is possible to trigger something while the user is editing a property and before a text input looses focus.  

 

image

Nov 25, 2015

Comments

Please login to comment.
Latest blogs
Why C# Developers Should Embrace Node.js

Explore why C# developers should embrace Node.js especially with Optimizely's SaaS CMS on the horizon. Understand the shift towards agile web...

Andy Blyth | May 2, 2024 | Syndicated blog

Is Optimizely CMS PaaS the Preferred Choice?

As always, it depends. With it's comprehensive and proven support for complex business needs across various deployment scenarios, it fits very well...

Andy Blyth | May 2, 2024 | Syndicated blog

Adding market segment for Customized Commerce 14

Since v.14 of commerce, the old solution  for adding market segment to the url is not working anymore due to techinal changes of .NET Core. There i...

Oskar Zetterberg | May 2, 2024

Blazor components in Optimizely CMS admin/edit interface

Lab: Integrating Blazor Components into Various Aspects of Optimizely CMS admin/edit interface

Ove Lartelius | May 2, 2024 | Syndicated blog