How to Include script link in LANSA WAM

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
Posts: 15
Joined: Wed Sep 21, 2016 12:54 pm

How to Include script link in LANSA WAM

Post by hoangtrungcs » Mon Jun 22, 2020 12:30 pm


As the title I would like to include script link as same api link : <script src=""></script>
to Wam directly without source code.

So Could you give me some suggestion?

Thank you so much!

Posts: 33
Joined: Wed Nov 16, 2016 1:43 pm
Location: Sydney, Australia

Re: How to Include script link in LANSA WAM

Post by AbelS » Thu Jun 25, 2020 3:35 pm

Hi Hoang

As it is a url and not a local script you host, you cannot use a web external resource. The following method does require you to write some XSLT.

If you are using your own layout weblets, just add your link after you call the "script" XSLT template.

If you are using a standard shipped layout weblet, create a copy of the one you are using (never change a shipped weblet!) and add your link after the call to the "script" XSLT template.

Code: Select all

<xsl:call-template name="script">
<script src="your_file_absolute_path" type="text/javascript" charset="your_charset"><xsl:comment /></script>
Don't forget to insert a comment to avoid your script element from self-closing.


Post Reply