I am working on an implementation using dhtmlxwindows.
I intend to simulate a javascript confirm box with a custom message and custom OK/Cancel buttons.
I have a function which takes in a message as an input parameter say for example openWindow(message).
I then initialize a dhtmlxwindow with an attached div which contains the aforementioned message & custom buttons.
I also have written 2 event listeners for the OK and Cancel buttons which close the dhx window using the hide().
I see the window open up fine and close if OK or Cancel are pressed.
However, I also want to return a true if OK is clicked and false if Cancel is clicked.
so that I can invoke it as
function doSomething()
{
var value = openWindow(“Are you sure?”);
if (value == true)
// do something else
else
return;
}
Can you assist me?
Thanks,
Rahul Kulkarni
dhtmlxWindow can not stop script like default confirm/alert message.
You can use it like this:
<div id=“confirmWindowContent”…>
confirmation text