Currently the only way to return some values from an HTML widget is by firing extended trigger but this is asynchronous (=this is only fired when the process return to the prompt). It would be very helpfull that the call of $fieldhandle(HtmlField)->$widgetoperation(\"JS:%%HtmlFunction%%%\",HtmlPar1,HtmlPar2) would return the value returned by the called Java Script function (using JS statement return) .

Use Case

Using text input fields in an HTML widget. If you click out of the HTML field or leave the form, there are no means to get back the typed value.




Proc Code

Operating System




One thought on “Handle return value when calling JS functions in HTML widget”

  1. We currently have a OCX component embedded in a Uniface forms. We need to implement this component as a Web (HTML) component. Our OCX component has methods that return values via $result, we want the same to happen for our Web component. We have tried using callback, ie JavaScript pushing the return value via a Uniface trigger, but it does not work for us because we need the return value before we make the next call to a JavaScript function. Hence, it would be ideal if $widgetoperation could return the value supplied by a JavaScript function.

Leave a Reply