12 10 Modify LANSA for the Web Messages

LANSA Web Functions

12.10 Modify LANSA for the Web Messages

LANSA for the Web displays messages to the user under various circumstances. For example, data validation message are displayed when records are inserted into a file.

If you need to modify any of these messages, edit the LWEB.DAT file in the LANSA shared library.

  • Do not modify the sequencing of the lines within the file.
  • Do not modify the JavaScript functions.
  • Do not add or delete any lines in the file.
  • Do not modify any of the words prefixed with the '%' character.

Multilingual Modifications

If you are using a non-English system and if you are encountering errors when you select the 'Home' key or messages are not displayed correctly, you may need to modify the syntax of the JavaScript functions.

You need to ensure that the following lines in the LWEB.DAT file look like this:

Note, in the following lines:

(1) represents the Primary Extension Name

(2) represents the Secondary Extension Name

(3) represents the Line Id.

(1) (2) Template (3) Text Data

        Group

        Name

HTM    ERRORPAGE  0  <head><title>Error</title>

HTM    ERRORPAGE  1  <script type="text/javascript"
                     language="javascript"> //<![CDATA[

HTM    ERRORPAGE  2  function HomePage(){ parent.location="%s"; }
                     //]]>

HTM    ERRORPAGE  3  </script></head><body><hr /><br />
                     <h1>%s</h1><br /><hr /><br /><br /><br />

HTM    ERRORPAGE  4  <a href="javascript:HomePage()">Return to Home
                     Page</a></body></html>

HTM    HOMEPAGE   0  <head><title>Display Home Page</title>

HTM    HOMEPAGE   1  <script type="text/javascript"
                     language="javascript"> //<![CDATA[

HTM    HOMEPAGE   2  function HomePage(){ parent.location="%s"; }
                     //]]>

HTM    HOMEPAGE   3  </script></head><body onload="HomePage()">
                     </body></html>

HTM    PREAMBLE   0  <!-- <?xml version="1.0"?> -->

HTM    PREAMBLE   1  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
                     Transitional//EN"

HTM    PREAMBLE   2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
                     transitional.dtd">

HTM    PREAMBLE   3  <html xmlns="http://www.w3.org/1999/xhtml">

HTM    RESETPAREN 0  <head><title>Reset Parent</title>

HTM    RESETPAREN 1  <script type="text/javascript"
                     language="javascript"> //<![CDATA[

HTM    RESETPAREN 2  function Reset(){ parent.location=
                     "%s://%s:%d/%s/%s?RESET+%s"; } //]]>

HTM    RESETPAREN 3  </script></head><body onload="Reset()">
                     </body></html>

In particular, you need to ensure that the '!' (Exclamation mark) character is correct, as well as the '{' and '}' (braces) characters.