Results 1 to 2 of 2

Thread: Accessing global JS variables in a JSSP script

Threaded View

  1. #1
    Junior Member
    Join Date
    Jul 2015
    Posts
    25

    Accessing global JS variables in a JSSP script

    Hi all,

    I've declared some variables to be used by the whole app in a JS page specified as the custom library in the app settings. Works totally fine accessing and mutating them from within pages, sections and so on. Now I'm building a webview section to display these variables in a nice, CSS'd format. Problem is, when I try to print the variables to the webview's html with javascript, it's telling me they aren't declared. Obviously they are, so it's not seeing the variables declared in the app's custom library.

    E.G.:

    lib_myapp.js
    Code:
    var myglobal = "abcd";
    page1_section1.jssp:
    Code:
    <%@ Language=JavaScript %>
    <html>
    <head></head>
    <body>
    <% print(myglobal); %>
    </body>
    Is it even possible to access those variables from the javascript on a JSSP page?

    Thanks.
    Last edited by jmartyr; 2016-01-03 at 23:37.

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us