They are not needed most of the time. When a JavaScript event happens, a collection of information about the event is sent to the function. It is stored in the variable "event" that you see in parentheses.
Some of this information is extracted out for you in the two lines below the start of the function.
There are also functions packaged up in the "event" variable (Well, technically it's called an "object"). A few months ago I needed to call on one of these functions.
I had a situation where a user needed to pick a date range, but I needed to do a validity check on the range before the dates got sent to a FEX file. My validation happens when the user clicks a submit button.
So in the button's click event, if the date range is determined to be invalid, I use this code to stop the FEX from being called on:
alert("Incomplete Discharge date range");
event.stopImmediatePropagation();
return;
The "stopImmediatePropagation" is a function that aborts the normal program flow that would result in the FEX file being called and working with a bad date range.
App Studio
WebFOCUS 8.1.05M
Windows, All Outputs