I have a function that creates an html dom modal window with a textbox and a button that closes it. When the close button is clicked, the value of the textbox is stored in a variable. The variable (as far as I know) is global, and is not limited to inside the modal window function. I have it set up