Results 1 to 6 of 6

Thread: can I use alert or console.log in Lianja custom javascript section?

  1. #1

    can I use alert or console.log in Lianja custom javascript section?

    Hi,

    I would like to use an alert or console.log to show me values that I am testing.

    These don't seem to be supported in Lianja.
    Is there a different function I could use to output a value?

    Thanks.

    Herb

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,162
    Blog Entries
    22
    The Lianja system object is available in all scripting languages.

    Code:
    Lianja.writeOutput("hello world");
    Lianja.writeLog("hello again");
    Lianja.execute("some vfp command");
    result = Lianja.evaluate("some VFP expression");
    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
    Hi Barry,

    How would I send a notification to the user in a custom javascript section?

    Is there a Lianja equivalent to alert()?

    Thanks.

    Herb

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,162
    Blog Entries
    22
    Lianja.showNotification("message" , nTimeout)

    or

    Lianja.showMessage("message")

    message can be formatted in HTML.

    nTimeout should be 0 to accept default.
    Last edited by barrymavin; 2013-07-31 at 21:14.
    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

  5. #5
    Perfect - Thank you!

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

    Just a heads up. I'm using console.log('text') myself. When using console.log() you need to right click on the WebView and look in the "Console" tab of the web inspector. You can type commands in interactively there too.

    See below.

    Name:  Screen Shot 2013-08-02 at 2.52.00 PM.png
Views: 113
Size:  50.4 KB
    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