Unable to call external javascript in native mobile application OutSystems.
I have used below code to load the external JS on the mobile screen onReday event.
var head1 = document.getElementsByTagName('head')[0];var script_src1= "your_js_url_with_parameters";var new_script1 = document.createElement('script');new_script1.type = 'text/javascript';new_script1.src= script_src1;head1.appendChild(new_script1);
Regards,
Ravindra
Hello @Ravindra Singh Kushwah
That's an interesting approach for sure. The only way I am aware of using javascript code from an external library is as explained in the article below. Hope it works for your use case.
https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/JavaScript/Extend_Your_Mobile_and_Reactive_Apps_Using_JavaScript/Use_JavaScript_Code_from_an_External_Library
AJ
I marked AJ's reply as solution, as this is the preferred way of using external JS libraries in OutSystems.
Hi,
- Assif