Reputation: 45
My question is about the parameter 'e' in server side handlers in GAS.
If i have a handler like
function handler(e)
{
}
I want to know what all is accessible using "e.parameter." What is e.parameter? Can i get the source widget that raised the handler?
Upvotes: 0
Views: 978
Reputation: 8660
What is e.parameter?
The e.parameter
is an instance of the Object class which stores values of widgets which were added to the handlers internals using the ServerHandler.addCallbackElement method.
Can i get the source widget that raised the handler?
Yes, it is possible by defining the widgets ID by calling its setId
method and using the parameter.source
variable, which contains the caller id, and the UiInstance.getElementById method.
Today was posted a question which is linked with your one.
Upvotes: 0
Reputation: 46802
I'm afraid the answer to your question would be far to long to fit in this form... Moreover it is not easy to answer without knowing what your initial knowledge of javascript might be... so to be short and clear, I'd suggest you have a look at this post answer and if you understand what the parameters shown there means than you get your answer. If not, I guess the best solution would be to read the documentation, try the tutorials and have a look at the many internet ressources on the subject.
EDIT : megabyte's answer gives you some elements, I would add that there is also e.parameter.source
that gives you the ID of the widget that call the handler (if more than one can do it)
Upvotes: 1