Skip to main content

Hi everyone.

I want to use the unifaceTriggers javascript function in a uHTML widget. The idea is to communicate between Uniface and my page. I want to use a tinyMCE control to allow my users to edit html messages.

So I use an uHTML widget with "Use extended triggers" and "Enable Javascript" checked. My html (with tinyMCE) is working ok.

If I send a function call from UNIFACE to JS, no problem it works

$fieldhandle(TRACEHTML)->$widgetoperation("JS:testText", "Test")

But not the other way around.

I've got this code in a JS function :

            try {
                window.unifaceTriggers('testback', 'test');
            }
            catch (err) {
                alert(err.message);
            }

And my trigger is

trigger testback
params
    string p_contenu:IN
endparams
    message/info p_contenu

Doesn't work.

I've tried with or without parameter, doesn't work either.

The unifaceTriggers runs without exception but returns undefined.

So there's obviously something I'm doing wrong, if anyone have an idea !

Thanks

Jean-Marc



------------------------------
Jean-marc Salis
Mp Services
Montauban Cedex FR
------------------------------

Hi everyone.

I want to use the unifaceTriggers javascript function in a uHTML widget. The idea is to communicate between Uniface and my page. I want to use a tinyMCE control to allow my users to edit html messages.

So I use an uHTML widget with "Use extended triggers" and "Enable Javascript" checked. My html (with tinyMCE) is working ok.

If I send a function call from UNIFACE to JS, no problem it works

$fieldhandle(TRACEHTML)->$widgetoperation("JS:testText", "Test")

But not the other way around.

I've got this code in a JS function :

            try {
                window.unifaceTriggers('testback', 'test');
            }
            catch (err) {
                alert(err.message);
            }

And my trigger is

trigger testback
params
    string p_contenu:IN
endparams
    message/info p_contenu

Doesn't work.

I've tried with or without parameter, doesn't work either.

The unifaceTriggers runs without exception but returns undefined.

So there's obviously something I'm doing wrong, if anyone have an idea !

Thanks

Jean-Marc



------------------------------
Jean-marc Salis
Mp Services
Montauban Cedex FR
------------------------------

There is community sample that shows how to embed tinyMCE  in the HTML widget. See:

I cannot remember for which Unfiace version it is, but it should work in version 9.7 and 10.3/10.4.

I hope this helps.



------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------

There is community sample that shows how to embed tinyMCE  in the HTML widget. See:

I cannot remember for which Unfiace version it is, but it should work in version 9.7 and 10.3/10.4.

I hope this helps.



------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------

Thanks, it helped me find where my mistake was.

I've installed the lates version of tinyMCE (6.5.1) and it works fine

Just for information, even when unifaceTriggers works, the function returns undefined 



------------------------------
Jean-marc Salis
Mp Services
Montauban Cedex FR
------------------------------