An example of an EWD page referencing EWD session variables is shown below. Session variables are referenced using the syntax:

<?= #sessionVariableName ?>

Note that you can add references anywhere in the page, including Javascript code. In this example, the session variables are assumed to have been instantiated in the pre-page script which is referenced in the ewd:config tag, or perhaps persisted from a previous page.

  <ewd:config isFirstPage="false" prePageScript="##class(ewd.test).getMyData">
  <html>
   <head>
    <title>EWD Page using Session Variables</title>
    <script language="javascript">
      function showIt() {
        var myVar = '<?= #mySessVar1 ?>' ;
        alert(myVar) ;
      }
    </script>
   </head>
   <body>
     <h3>This page accesses EWD Session Variables</h3>
     <div>Example value = <?= #myExample ?></div>
     <div>
       <input type="button name="x1" value="Show Value" onClick="showIt()" />
     </div>
   </body>
  </html>