Results 1 to 3 of 3

Thread: Short Notation for Cuurent Section and Current Page

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    351

    Short Notation for Cuurent Section and Current Page

    Hi all

    Just to check if there is anyway to have short form notation of the current section or the equivalent of VFP "Thisform."
    This will help to make coding easier to read as most of the reference to the DOM object will be in the current section.
    Similarly, is there a shorthand notation for the current page?

    Your advice is much appreciated

    Thanks & Best Regards

  2. #2
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Hi,

    Something similiar to This and Thisform in VFP for the App, Page, Section, Field and Gadget:

    Code:
    loMyControl = Lianja.activepage.activesection.activecontrol


    For active page:


    Code:
    oactivePage = Lianja.activePage
    nameactivePage = Lianja.activePage.id


    Section:


    Code:
    oactiveSection = Lianja.get("mypage").activesection
    Also

    Code:
    Lianja.localstorage.setItem( key, value )
    Code:
    Lianja.sessionstorage.setItem( key, value )

    And the corresponding getItem() on these work between desktop and web//mobile

    _screen is VFP desktop specific and does not exist in the web client.

    http://www.lianja.com/community/show...rs-Referencing

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,186
    Note that Lianja.activepage is not available in web/mobile.

    To help in web/mobile, I suggest using the option in Lianja of using VSCode as the editor, with the JSHint extension installed. Once you have typed Lianja.get("mypage.mysection.mycontrol"), from then on you will see options as you begin to type Lianja.get(" which include those that you have typed previously. Saves a lot of typos (although if you have previously typed a statement with a typo, you will see that too).

    Hank
    Last edited by HankFay; 2019-08-19 at 01:13.

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