This topic is locked

modal prompt result not registering on the server and client after even

1/12/2016 13:12:47
PHPRunner General questions
K
krisrianto author

I created a modal prompt to replace the javascript prompt because i want to avoid "prevent this page from creating additional dialogs" checkbox. However, it seems that the result from the modal javascript prompt (I tried several: sweetalert, bootbox) does not get passed to the server event and the client event. It seems that the server event fires before the modal prompt finish. How do I get the result from the modal prompt to the server event?
thanks

Sergey Kornilov admin 1/13/2016

Where do you add your "modal prompt" window and how do you pass results to the server?

K
krisrianto author 1/13/2016

i add it to the "client before" button property
bootbox.prompt("What is your name?", function(result) {

params["txt"] = result;

ctrl.setMessage("Sending request to server...");

});
The rest is the standard events

Sergey Kornilov admin 1/13/2016

Not really familiar with bootbox. Does it work when you use the standard prompt() function?
According to http://bootboxjs.com/ these functions are asynchronous meaning that you cannot use it in this scenario. You need to find something that is synchronous.

K
krisrianto author 1/13/2016

it works using standard prompt function. I have been looking for synchronous modal prompt but it seems that majority of modal prompt is asynchronous. Does anybody know of synchronous modal prompt?