So say I have a function. I want it to return a value when an event is triggered, says when a button is clicked. In the function, I have var funcStorage=this; In the button, I have onclick="funcStorage.return("something");".
First, how do I make the function wait for the click asynchrously. Second, how do I trigger the return statement like this? Also, I am a very new user and this is my first question. How do I format code?
In your button:
your function: