External resources for widget

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Paulm
Posts: 9
Joined: Mon Nov 28, 2022 5:58 pm

External resources for widget

Post by Paulm »

Hello,

We are currently working on a project using a widget to implement javascript code.

We want to create a widget which uses external Javascript files but also xml files (used to store configuration data for the javascript execution).

We managed to create js files as external resources in the repository  (which we reference in the widget in the resource tab) and the functions they contain seem to be available from js code inside the widget.

We also created resources for the  two xml files, but we cannot access them from js code in the widget.
We tried different places whitout success :
- C:\Program Files (x86)\LANSAPTD\WebServer\Images
- C:\Program Files (x86)\LANSAPTD\X_WIN95\X_LANSA\x_BPF\web\vl

Where must the xml files be placed and how do they have to be referenced in the javascript in the widget ?

Thank you for your help!
BrendanB
Posts: 134
Joined: Tue Nov 24, 2015 10:29 am

Re: External resources for widget

Post by BrendanB »

Paulm,

if you have the files in the first location you would access them:

C:\Program Files (x86)\LANSAPTD\Webserver\Images:

In your widget, use the following to access the file:

https://youserver/images/myfile.xml

C:\Program Files (x86)\LANSAPTD\X_WIN95\X_LANSA\x_BPF\web\vl

Use:

https://youserver/lansaptd/bpf/LansaExample.xml

(i have assumed that lansaptd is you instance name. (ie. you would access https://yourserver/lansaptd/bpf/mywebpage.html )

Brendan.
Post Reply