Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8186893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:22:43+00:00 2026-06-07T02:22:43+00:00

I am creating a UI panel with buttons and text boxes for use on

  • 0

I am creating a UI panel with buttons and text boxes for use on a Google site. It seems the script re-starts (Globals re-load, Logs clear) on occasion – as best I can figure it’s after hitting a button. There’s nothing in the button handler that causes an error. The button handler runs fine (the doGet does NOT seem to run again).
Using the following to set up the button handler. Maybe something here is causing it?

//container is the app

//textOnButton = "Next"

//handler ="submitNext_"   - name of method that handles click

//vPanel is the panel containing the button

var submitButton = container.createButton().setId(textOnButton);

submitButton.setText(textOnButton);

// submit handlers

var submitServerHandler = container.createServerClickHandler(handler);

submitServerHandler.addCallbackElement(vPanel);  

submitButton.addClickHandler(submitServerHandler); 

Any ideas about this behavior? The main problem is a couple of my global constants aren’t really constants and they get re-set on this restart. I can store them in UserProperties as a work-around but wanted to understand why this was happening.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:22:45+00:00Added an answer on June 7, 2026 at 2:22 am

    This is intentional behavior. Each callback runs a “fresh” script, and as such it is not advisable to have constants that aren’t really constants. See the class documentation here:

    https://developers.google.com/apps-script/class_serverhandler

    Serge, those methods are deprecated simply because we replaced them all with createServerHandler which works for any type of handler. All of the old wordy createServerXXXHandler methods still work; they are just synonyms for createServerHandler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a panel and then adding some labels/buttons to it to form
I am creating linkbuttons inside of a panel and hooking up an event handler
Basically I have a tabbed Panel I'm creating. When the user click on a
I'm creating user controls that i will put into an update panel and make
I am adding a RadButton dynamically to a Panel. So I am creating the
I am creating a WPF custom control, a Button with an Image and Text
I am creating a small game, the game is printed onto a panel on
I am creating a GUI with C#. I intended to use a ListView to
I'm creating a small game, you click buttons (up, down, left and right) to
I'm dynamically creating validation controls and adding them to an update panel. However the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.