Page 1 of 1
How to Include script link in LANSA WAM
Posted: Mon Jun 22, 2020 12:30 pm
by hoangtrungcs
Hello
As the title I would like to include script link as same api link : <script src="
https://checkout.stripe.com/checkout.js"></script>
to Wam directly without source code.
So Could you give me some suggestion?
Thank you so much!
Re: How to Include script link in LANSA WAM
Posted: Thu Jun 25, 2020 3:35 pm
by AbelS
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">
...
</xsl:call-template>
<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.
HTH
Abel