Results 1 to 2 of 2

Thread: evaluate have error

  1. #1
    Member
    Join Date
    Oct 2012
    Location
    México city
    Posts
    67

    evaluate have error

    Hello I have many evaluates but one dont work. Is very simple but I dont undestand , in my form section I have data
    use avaluate but give an error
    look the code is very simple

    java :
    function page1_section5_parentdatachanged()
    {
    // insert your code here
    oJSON = Lianja.get('page1.section5').getJSON();
    // CONVERTIMOS TODOS LOS OBJETOS DEL OBJETO FORMA (SECCION) A STRING;
    var cJSON = json_encode(oJSON);
    var resultado = Lianja.evaluate("funcion1('"+cJSON+"')");
    Lianja.showMessage('Valor del grid ..'+resultado);
    Lianja.get("page1.section4").refresh();
    };

    and in my prg I have :

    parameter p1
    oJSON = json_decode(p1)
    open database prueba_tablas

    ww_unicod=oJSON.ceu_unicod


    return ww_unicod

    Name:  2021-11-29 (4).jpg
Views: 95
Size:  91.7 KB

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

    You need to base64_encode() the JSON and base6_decode() it in your server procedure.

    Client:

    Code:
    var cJSON = base64_encode( json_encode(oJSON) );
    
    Server:

    Code:
    oJSON = json_decode( base64_decode(p1) )
    Last edited by barrymavin; 2021-11-29 at 19:22.
    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