Skip to main content
Participant
October 14, 2013
Question

more function to a single button

  • October 14, 2013
  • 2 replies
  • 600 views

the is a way to give more than one functon to a single button?

i have an "apply" button on my script and i have a functon on this button, but i have to add another functon whitout creat another button.

i use this code

Btn.onClick = applyExpression;

tnx

This topic has been closed for replies.

2 replies

Legend
October 14, 2013

You could simply just contain them all in one function assigned to the button.

Btn.onClick = function(){

     applyExpression();

     myOtherFunction();

     secondFunction();

     ///etc....

}

Dan Ebberts
Community Expert
Community Expert
October 14, 2013

Can't you just have the first function call the second function?

Dan

DadesAuthor
Participant
October 14, 2013

There are four function that do different things

The first one add an epression fron a dropdownlist

The others change setting to the layer

Maybe i can create a first function that read others funtion?