Results 1 to 6 of 6

Thread: Combo box Choice

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    21

    Combo box Choice

    Hello

    I am using a canvas section , javascript.
    I have 2 combo boxes
    Field 1 is populated with database names
    Choices:
    select table_cat from systables order by table_cat group by table_cat
    In the change event:
    m_database=Lianja.get("page1.section1.field1").val ue;

    I declare m_database in page1.section1.init


    Second combo box
    Field 2
    Choices:
    select table_name from systables where table_cat=m_database

    The second combo box is not populated.

    How do I get the second combo box populated with tables from the database I selected in the first one.

    Thank you
    Paudie

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,010
    Oops ... didn't notice that's what you were doing.

    Hank
    Last edited by HankFay; 2020-10-20 at 23:49.

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,966
    Hi Paudie

    You need to refresh() the second combo box.

    Lianja.get("page1.section1.field2").refresh()

    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

  4. #4
    Junior Member
    Join Date
    Feb 2012
    Posts
    21
    Hi Barry
    I inserted the refresh but the table combobox did not populate.
    Also when I deploy to the cloudserver the database combobox does not appear on the screen. See images attached.
    I added a third combobox. On the deployed app only the third combo box is visible.
    Paudie

    Name:  lianja_Screenshot 2020-10-21 091228.jpg
Views: 18
Size:  64.9 KBName:  lianja_web_Screenshot 2020-10-21 091320.jpg
Views: 18
Size:  23.0 KB

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,966
    Package up a small app example and attach to a ticket so we can help.

    You cannot place client side variables in a sql statement that will execute on the server. Use { } macros and these will be expanded on the client before being sent to the server.

    Web apps are client server.
    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
    Junior Member
    Join Date
    Feb 2012
    Posts
    21
    Ticket opened.

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