Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: using show document to display another record in the form section

  1. #11
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,732
    If you run code that encounters an error Lianja will display the debugger to let you inspect variables etc at the point the error occurs.

    This is typically when you have the build mode set to “debug”.
    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

  2. #12
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Barry,

    May I know what mistake that I made in my code?

    Name:  Screen Bug one.jpg
Views: 39
Size:  21.4 KB
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'custommenu' event
    function myCallBack(key,value)
    {
    messagebox("You chose '"+value+"'")
    Lianja.showDocument("section:section1?action=searc h&text="+value);
    }


    function mydataselect(buttoncaption,text)
    {
    messagebox(buttoncaption);
    messagebox(text);
    Lianja.showDocument("pageage1.section1?action=search&text="+text);
    }







    function page1_section1_custommenu(item)
    {
    // insert your code here
    if (item === "Data Grid")
    {

    Lianja.showQueryPicker("Customer record", "myCallBack()", "southwind", "customers", "database=southwind&table=customers&tabletitle=Cus tomer Record&picklist=customers|*&columncount=0&selectco lumn=customerid&buttons=select,Cancel&onbuttonclic k=mydataselect()&showcolumns=false&pagesize=10", 800);

    }

    };


    Thanks & Best Regards
    Last edited by WJ; 2020-01-05 at 01:32.

  3. #13
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,099
    Hi,

    I can't recognize letters from your screenshot.
    Please make a better screenshot.
    Cant read the red line.

  4. #14
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Josipradnik,

    Here is the screenshot
    Name:  Capture.jpg
Views: 40
Size:  73.0 KB

  5. #15
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    the previous screenshot error message is refrence error can't find variable value

  6. #16
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,732
    Basic programming. You have a typo pagepage1 and you are omitting semi colons in places.
    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

  7. #17
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Barry,

    Thank you so much for correcting my mistakes! It's still not working when I run it in the browser view.

  8. #18
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,732
    What’s not running exactly. You need to learn how to debug your code. That’s what programming is all about.
    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

  9. #19
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,732
    You have 2 calls to showDocument. Compare them...

    Test them in the JavaScript console in the browser. Learn how to debug JavaScript in the web console and how to set breakpoints. This is a basic requirement if you want to write custom code and debug it.
    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

  10. #20
    Senior Member
    Join Date
    Jul 2019
    Posts
    175
    Hi Barry,

    I tried putting the two-parameter values of mydataselect function inside the messagebox function and ran it on desktop view. The message box displays undefined twice when I select one of the rows inside the data grid and click on the select button.

    https://drive.google.com/file/d/19jK...ew?usp=sharing

    Thanks & Best Regards

Page 2 of 3 FirstFirst 123 LastLast

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