0 votes
by (180 points)

Well, how the title says, what I want to do is use a script that refreshes the passage. And for it to be executed inmediatly after the Dialog popup closes.
What I want to use exactly is: 

state.display(state.active.title, null, "back")

I've been using it and had no problem on buttons, links, etc. What I want to do with it is refreshing the main page so some variables I modify inside the Dialog show the correct values when I close it.
I've been reading the documentation and thought that closeFn was the way to do it but I couldn't, don't know if I am doing something wrong, or simply isn't the way.
Plus: If there is any way to hide/remove Dialogs close button, also couldn't do it yet.
Thanks in advance.

1 Answer

0 votes
by (159k points)

1. The syntax for suppling an anonymous JavaScript function as the closeFn argument of the Dialog.open() function is as follows.

Dialog.open(null, function () {
	/* JavaScript to execute. */

2. Using the Engine.play() function to reload the current passage without adding a new Moment to History.

Engine.play(passage(), true);