Results 1 to 5 of 5

Thread: How can I get Jquery to run while still in desktop mode for a jssp page?

  1. #1

    How can I get Jquery to run while still in desktop mode for a jssp page?

    Hi - I know how to do this for an .RSP page.

    For an RSP page - I can use the following code


    HTML Code:
    private m_embedded = getParameter("embedded", "false")
    private m_libpath
    set macros on
    set fixed on 
    if isServer()
    	m_libpath = "../../library/"
    else
    	m_libpath = "lib:/"
    endif
    if m_embedded = "false"
    	? '<html>'
    	? '<head>'
    	? '<link rel="stylesheet" href="&m_libpath/bootstrap-3.3.4/css/bootstrap.min.css">'
    	? '<script src="&m_libpath/jquery-1.10.2/jquery-1.10.2.min.js" type="text/javascript"></script>'
    	? '<script src="&m_libpath/bootstrap-3.3.4/js/bootstrap.min.js" type="text/javascript"></script>'
    	? '</head>'
    	
    endif
    %>
    How do I accomplish the same thing for a .JSSP?

    Thanks.

    Herb

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Hi Herb,

    Its all very similar as documented here:
    https://www.lianja.com/doc/index.php...t_Server_Pages

    Instead of using ? <expr> to output text you use print(<expr>) pr(<expr>) or echo(<expr>) in JavaScript.

    The following associative arrays are available to you in JavaScript on each page request.

    $_REQUEST
    $_SERVER
    $_COOKIE
    $_ARGS
    $_GET
    $_POST
    $_FILES
    $_SESSION

    So for example you can reference $_ARGS["embedded"]

    As per your requirements I have added:

    Lianja.getUrl( "url..." ) to Lianja 3.4.1 which returns a string which is returned from the remote server.

    This is available in desktop and web framework.

    Note that you can also use this on the client.

    Lianja.OData_Read(url, callback);

    e.g.

    Lianja.OData_Read("http://xxxx...", function(result)
    {
    });

    This function returns JSON and can handle any URL.
    Last edited by barrymavin; 2017-05-02 at 22:09.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Fantastic! - I somehow missed this post.

    Thanks so much.

    Herb

  4. #4
    does isserver() work in an jssp page?

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    You can use Lianja.evaluate( "vfp_expression" ) to evaluate any function not available in jssp pages.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

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