Results 1 to 6 of 6

Thread: referencing of the value of a filed on canvas section for web page

  1. #1
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657

    referencing of the value of a filed on canvas section for web page

    Web app, finally decided this is the way to go even with the learning curve for me involved.
    Canvas section

    I have an edit box that I want to make invisible depending on the value in of a txt box on the canvas section

    If I set the visible property of the edit box to 1 = 2 and run it then it is invisible

    If I set it to :

    Lianja.get("page1.dpref.txtcsex").value = "M"

    It does nothing even when the value in txtcsex = M

    Can someone please tell me what I'm doing wrong here in the referencing of the value.

    David

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,199
    Blog Entries
    22
    In javascript as with many other languages = is an assignment operator whereas == is a comparison operator.
    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
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657
    Hi Barry

    If I set it to
    Lianja.get("page1.dpref.txtcsex").value == "M"

    It still does not work, it's invisible all the time no matter what the value of txtcsex is M F or U

    I have taken the entry for page1.dpref.txtcsex directly from the txtcsex Full name entry on the form, so the wording for that should be correct

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,199
    Blog Entries
    22
    Sorry where are you placing that code.
    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
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,199
    Blog Entries
    22
    Switch to runtime view. UI elements in development view will always be visible. Otherwise you wouldn’t be able to design anything.
    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

  6. #6
    Senior Member
    Join Date
    Apr 2012
    Location
    United Kingdom
    Posts
    657
    Hi Barry,

    Yes this isn runtime and it is alway invisible with the entry

    Lianja.get("page1.dpref.txtcsex").value == "M"

    in the visible when entry for the edit box

    If I put 1 = 2 it's invisible
    If I put 1 = 1 it's visible

    But with
    Lianja.get("page1.dpref.txtcsex").value == "M"

    it's always invisible even when the value of page1.dpref.txtcsex = "M"

    I put a command button on the form and added click code
    Lianja.showmessage(Lianja.get("page1.dpref.txtcsex ").value)

    That works and display the entry, so the value is correct

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