Results 1 to 2 of 2

Thread: change webview content programmatically

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    118

    change webview content programmatically

    Hi,

    How the best way to change html content on webview programmatically?

    Regards,

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

    Lianja.get("page1.section1").webview.url = "..."

    For a webview in a canvas section:

    Lianja.get("page1.section1.field5").url = "https://...."
    Lianja.get("page1.section1.field5").html = "hello world"

    Note that you can call JavaScript function *inside* WebViews using:

    Lianja.get("page1.section1").evaluate(" yourFunction(...) ");
    Lianja.get("page1.section1.field5").evaluate(" yourFunction(...) ");

    This provides the ability to interact with code in the WebView which can update the UI dynamically.

    You can therefore interact with any internal webview content without having to reload it.





    Last edited by barrymavin; 2023-03-17 at 00:38.
    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