1
votes

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

1
I strongly believe that if you study the question and answer provided here stackoverflow.com/questions/41645111/…, you'll figure it out. - Morfinismo
thank you it works perfectly ! - Hugo Bricoult

1 Answers

0
votes

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();
    }