Jorge Relea Gallego (JorgeR10)

JorgeR10 Member since 2014 8 posts
Posted: December 19, 2018
Last activity: December 19, 2018
Posted: 19 Dec 2018 4:34 EST
Last activity: 19 Dec 2018 6:31 EST

Call Javascript function from HTML fragment


I am trying to call a Javascript function (which is defined on a Text File, OOTB from Pega Call) from an HTML Fragment that I have defined, inside the <script> tags.

The problem I face is that, everytime I try to execute it, the response is that some other function is not defined, for example, there is a "sendError" function inside the code of the function that I need to call, and it says when I test it: "sendError is not defined". If I copy/paste the definition of sendError to my code, the same will happen for many more functions, basically every function referenced anywhere on the code.

I tried to copy the definition of all the referenced functions, but in the end there was some for which I could not find the definition anywhere. I tried to include the other text files as <script src="webwb/filename.js">, but it didn't make any difference.

Anyone can tell me what would be the correct way to call the function from my HTML Fragment? I might be missing some way to include the other JS files on my code, so that I can freely use its functions.

Thanks for the help!

Low-Code App Development Data Integration Java and Activities
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.