1

I have on a AppMaker page a button who execute a function on the client side

function showall(){
  app.pages.ProjectComposant.children.Html1.html = google.script.run.showhtml();
}

and the function on the server side is

function showhtml(){
  return "<p>test</p>";
}

but the server not return the string. I have try to use the withSuccessHandler() but there is no onSucess handler on the client side script

There is another way to get a returned value from the server ? tanks

  • I strongly believe that if you study the question and answer provided here https://stackoverflow.com/questions/41645111/generating-an-email-list-from-appmaker-database/41646149#41646149, you'll figure it out. – Morfinismo Mar 12 '19 at 13:55
  • thank you it works perfectly ! – Hugo Bricoult Mar 12 '19 at 14:08

1 Answers1

0

in server side

function showhtml(){
  return JSON.Stringify("<p>test</p>");
}

in client side

    function showall(){

    google.script.run.withSuccessHandler(
function(returned_result){ 
app.pages.ProjectComposant.children.Html1.html = JSON.Parse(returned_result); 
})
    .showhtml();
    }
Islam ElKassas
  • 116
  • 1
  • 5