Change Event undesirable interaction

I have a Webpage with some controls that “interact”. Example: A radio button causes a drop down list to change content based on a selected radio button selection. When the form is used interactively by a user it works OK but when I clear the form and reset controls to default values or load values into a form from a record, all of the change events fire and cause some un-intended and sometimes undesirable issues.

I have played around with setting a boolean flag to be detected and not act on the change of a related control but it is hard to control to achieve the result I need.

Example: I set the flag at the beginning of reading a record and posting the result to the various controls and turn it off at the end. Well of course no browser interaction happens until I return control for more input from the browser and now many of the events fire AFTER the flag is turned “off”.

What is the best way to handle this type of problem?

PS - I thought I had previously posted this topic and did not get a reply but I could not find it. Sorry if it is a duplicate.

It sounds like a good solution would be the ability to send a command to the browser with all of the rest of the updates and get a callback.

I just whipped up an example of how to do this with the WebSDK:

Basically, you’d copy the WebCallback object to your project, add it to the webpage where you’re having trouble and then when you are about to update all of your controls, you’d do something like this:

updateflag = false ...all of your reset code goes here... Callback1.send('updateflag')

Then you’ll need to implement the Callback event with something like this:

if tag.stringvalue = 'updateflag' then updateflag = true end if


Thanks for the reply and the extra effort of the example. This looks like the “missing link” to have the browser give some feedback to the server essentially making a closed loop.

My workaround was to set the flag when I started to do this type of update then turn on a one shot timer when I was done and turn off the flag after a small delay. It works most of the time but the callback technique makes it absolute. The user can get some positive feedback by leaving the progress wheels running until the callback completes.