Skip to main content

uHTML keeps content from to form, ending with errors

  • June 16, 2025
  • 5 replies
  • 1 view

Forum|alt.badge.img

Hi.

I've got a form (Form1) containing a uHTML widget. I do a lot of stuff here, starting with

    MY_HTML = "&file://%%$URLMENU$"
    $fieldhandle(MY_HTML)->$widgetoperation("JS:doStuff", l_json)

Then I do muliple stuff, including navigating with changing the file the same way in a trigger of MY_HTML

trigger goToNextPage

    MY_HTML = "&file://%%$URLPAGE1$"
    $fieldhandle(MY_HTML)->$widgetoperation("JS:doOtherStuff")

end

It works, no problem.

Now I have a other form (Form2), also with an uHTML widget, totally unrelated to the first one. I start it the same way.

    MY_OTHER_HTML = "&file://%%$OTHERURL$"
    $fieldhandle(MY_OTHER_HTML)->$widgetoperation("JS:doNewStuff", l_json)

But when it opens, here is what happens :

Form2 opens with the last content of Form1 (!!!)

Then some time passes (perhaps the stuff I'm preparing in my Form, reading data)

Then the HTML goes blank and error are fired (mainly "HTML Widget: Uncaught ReferenceError: doNewStuff is not defined")

If I exit Form2 and relaunch it, it works.

Does any of you have already had this behavior ? And know a way to avoid it ?

Thanks



------------------------------
Jean-Marc SALIS
Mp Services
Montauban Cedex FR
------------------------------

5 replies

Iain Sharp
Forum|alt.badge.img+1
  • Inspiring
  • 373 replies
  • June 16, 2025

Hi.

I've got a form (Form1) containing a uHTML widget. I do a lot of stuff here, starting with

    MY_HTML = "&file://%%$URLMENU$"
    $fieldhandle(MY_HTML)->$widgetoperation("JS:doStuff", l_json)

Then I do muliple stuff, including navigating with changing the file the same way in a trigger of MY_HTML

trigger goToNextPage

    MY_HTML = "&file://%%$URLPAGE1$"
    $fieldhandle(MY_HTML)->$widgetoperation("JS:doOtherStuff")

end

It works, no problem.

Now I have a other form (Form2), also with an uHTML widget, totally unrelated to the first one. I start it the same way.

    MY_OTHER_HTML = "&file://%%$OTHERURL$"
    $fieldhandle(MY_OTHER_HTML)->$widgetoperation("JS:doNewStuff", l_json)

But when it opens, here is what happens :

Form2 opens with the last content of Form1 (!!!)

Then some time passes (perhaps the stuff I'm preparing in my Form, reading data)

Then the HTML goes blank and error are fired (mainly "HTML Widget: Uncaught ReferenceError: doNewStuff is not defined")

If I exit Form2 and relaunch it, it works.

Does any of you have already had this behavior ? And know a way to avoid it ?

Thanks



------------------------------
Jean-Marc SALIS
Mp Services
Montauban Cedex FR
------------------------------

Hi, 

The opening old page on entry is due to the cefrenderercache setting (defaults to 20). This keeps the first 20 copies of cefrenderer open in cache memory to speed the next instance opening them. 

There was a call about having it ensure the page was blank within the cached copy, but I'm not sure if this has been actioned. 


We set it to 0 on some customer sites, where they frequently visited (badly designed) pages which were chewing up the CPU, because even when the form in Uniface was closed, the cached cefrenderer was still chewing up the CPU. 

CefRendererCache

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

Iain Sharp
Forum|alt.badge.img+1
  • Inspiring
  • 373 replies
  • June 16, 2025

Hi, 

The opening old page on entry is due to the cefrenderercache setting (defaults to 20). This keeps the first 20 copies of cefrenderer open in cache memory to speed the next instance opening them. 

There was a call about having it ensure the page was blank within the cached copy, but I'm not sure if this has been actioned. 


We set it to 0 on some customer sites, where they frequently visited (badly designed) pages which were chewing up the CPU, because even when the form in Uniface was closed, the cached cefrenderer was still chewing up the CPU. 

CefRendererCache

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

Hi again, 

It is reported as fixed in  10.3.03 Patch 025 and 10.4.02. Patch 004

I am not sure what version you are on? 

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

Forum|alt.badge.img
  • Author
  • Participating Frequently
  • 20 replies
  • June 16, 2025

Hi again, 

It is reported as fixed in  10.3.03 Patch 025 and 10.4.02. Patch 004

I am not sure what version you are on? 

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

Hi Iain, thanks for your answers, gonna check that.

Unfortunately we still stucked on 10.2 for now.



------------------------------
Jean-Marc SALIS
Mp Services
Montauban Cedex FR
------------------------------

Forum|alt.badge.img
  • Author
  • Participating Frequently
  • 20 replies
  • June 16, 2025

Hi again, 

It is reported as fixed in  10.3.03 Patch 025 and 10.4.02. Patch 004

I am not sure what version you are on? 

Regards, 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------

Ok, so the problem was elsewhere, but clearing this cache issues helped me understand my bug.

So thanks again !



------------------------------
Jean-Marc SALIS
Mp Services
Montauban Cedex FR
------------------------------

Iain Sharp
Forum|alt.badge.img+1
  • Inspiring
  • 373 replies
  • June 16, 2025

Ok, so the problem was elsewhere, but clearing this cache issues helped me understand my bug.

So thanks again !



------------------------------
Jean-Marc SALIS
Mp Services
Montauban Cedex FR
------------------------------

Welcome. 

Iain



------------------------------
Iain Sharp
Head of Technical Services
Jonas Metals Software Limited
Sheffield GB
------------------------------