Skip to main content
Question

Uniface JS call to turn on/off the 'processing' indicator.

  • February 17, 2026
  • 2 replies
  • 46 views

Iain Sharp
Forum|alt.badge.img+5

We have a web page built in against an HTML widget in our CS. 
Clicking a button on the web page uses a JS trigger to start loading a CS form and populating it with data. 
Whilst this is happening (can be up to 10 seconds before the entire form is loaded/shown) the web page is active and there is no indication at the client end that anything is happening. 

I’d like to turn on the ‘Processsing’ function, as per the refresh/loading of the page in the first place, from JS calls to the HTML widget before the activate of the triggered form, and off again after the form is loaded. (So the user doesn’t think nothing is happening and click the button several times (causing multiple instances of the form to fire up). 
Is this possible? Putting the DSP into ‘locked/processing’ state without the round trip to the server refresh… 

Iain

2 replies

Michael Taylor
Forum|alt.badge.img+2

Hi Iain,

The blocking mechanism cuts in when a DSP is included with an output scope. Try adding an operation in the calling DSP’s scope block of the DSP doing the processing.

operation process
scope
input
output
operation calling_dsp.operation
endscope
javascript
...
endjavascript
end

Mike


Iain Sharp
Forum|alt.badge.img+5
  • Author
  • Inspiring
  • February 19, 2026

Hi Mike, 

I don’t think that’ll trigger at the right point. 

I have a javascript webtrigger which calls 

window.unifaceTriggers("web_hyperlink","<MAINT_FORM>",this.getParent().getField("<UNQ_ID.<ENT_NAME>>").getValue())

This causes the ‘wrapper’ program with the HTML widget on it which is rendering this DSP, to activate MAINT_FORM and pass it UNQ_ID to look the data up. 

Activating the form in the CS, from the wrapper form, can take 10 seconds during which time there is no evidence anything is happening. (No change in mouse to ‘hourglass/circle’, nothing). Buttons on the web form etc can be activated while the CS is still beavering away firing up the maintenance form. 

So the user can bat about clicking links on the DSP and queuing up triggers on the HTML widget to open form after form. Since there is no current effect that clicking the button has begun any process, most of my users will click it again in the 10 seconds it takes to fire up the maintenance form. 
I was looking for a consistent method of indicating that some processing is ongoing (in this case, outside the scope of the DSP/WRD entirely) so the user doesn’t panic and start hitting buttons again. 
I suppose I can have an alert area fire up and say ‘form loading please wait’ and then clear it again at the end of the trigger on the HTML widget, but I’d prefer if it was the same as the DSP processing function. 

I presumed there was a JS function for ‘lock the screen for processing’ and ‘unlock the screen again’ which was triggered by the call back to the WRD, and just wondered if I could fire those manually…. 

Iain