Results 1 to 3 of 3

Thread: Access individual canvas fields' attributes in non-desktop apps?

  1. #1
    Junior Member
    Join Date
    Jul 2015

    Access individual canvas fields' attributes in non-desktop apps?

    Hi everyone,

    I'm using canvases a lot in my app for the added flexibility they bring. In a desktop app, you can access (for example) the text in field1 of a canvas with
    var myvar = Lianja.get("page1.section1.field1").text
    In non-desktop apps this seems to fail. I've tried running that both client- and server-side to the same result. Running in the JavaScript console in the web app debugger
    returns "".

    This makes me think the feature isn't implemented in non-desktop apps? If not, is there a different way of doing it? I find this functionality really useful in a lot of ways, for example setting the default value of a textbox dynamically based on what the user entered on a previous page.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    UK, USA, Thailand
    Blog Entries
    In JavaScript web and mobile apps they have a JavaScript object variable declared automatically as the ID of the UI control so naming is important.

    in your case here you would name field2 something sensible and just reference the properties as

    Also look at the toJSON() method on sections if you want to gather all data off a form to send to a server side procedure for processing. Use this in conjunction with base64_encode() and base64_decode() on the server.
    Last edited by barrymavin; 2016-02-08 at 18:14.
    Principal developer of Lianja, Recital and other products

    Follow me on:


  3. #3
    Junior Member
    Join Date
    Jul 2015
    Oh okay that's a lot faster. Thanks Barry!



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