cancel
Showing results for 
Search instead for 
Did you mean: 

Insert JavaScript in own Embedded Component

VoJu
Participant
0 Kudos
320

Hello everyone!

Is it possible to include JavaScript inside an own embedded component? I changed the XML of my embedded component by inserting a <uxc:JScriptSource>-Tag with the SAP Cloud Applications Studio, but unfortunately the JavaScript is not executed. I am not sure if the <uxc:JScriptSource> is the right way to accomplish my task.

Thanks and best regards,

Julian

Code inside XML:

<uxc:JScriptSource> <![CDATA[ window.onload = function () { console.log('JavaScript from EC'); } ]]> </uxc:JScriptSource>

Accepted Solutions (0)

Answers (1)

Answers (1)

VoJu
Participant
0 Kudos

I tried a few things <uxc:JScriptSource> Tag, only <script>-Tag, combination of both tags but nothing worked. Is custom JavaScript forbidden inside XML?