function deletebutton() {
{isc.confirm("Dit record zeker verwijderen?",
{title:"Bevestigen",
toolbarButtons:[isc.Dialog.YES, isc.Dialog.NO],
yesClick : function ()
{ costgrid.removeData(costgrid.getSelectedRecord()); this.hide();}
});
}
};
The function is fired by another button.
It works fine the first time it is fired and the record is removed from the grid and from the mysql-database, after clicking the YES-button..
If after this first time I want to remove a second record, the confirm-window shows again as it should be, but after clicking the YES-button again nothing happens anymore. Even no POST to the server at all.
If I replace the function in the Yesclick by a simple canvas.create to test, it is exactly the same, so only the first time it works.
Ok, on that point you were right. I corrected that. I removed the opening curly brace just before isc.confirm and the corresponding closing one. I think that part is now ok, but the problem is still the same.
Afcourse, the second time I select a record first.
But the second time the yesClick method is not called.
Other strange behaviour: If I remove the this.hide() for test purposes:
Then after the first call the Confirm canvas stays visible as expected and I have to click it away manually.
The second time it disappears after clicking on the YES-button.
I just uploaded 7.0RC2 and changed the YesClick function in a simple window.create. But with the same result.
First time clicking on the delete button and firing the function “deletebutton” the confirm window appears and clicking on the Yes button shows the testwindow.
After clicking on the closebutton of the confirm window and clicking on the delete button again shows the confirm window again (so no problem so far) but clicking on the Yes button again doesn’t show the test window anymore.
And the result is still the same, so the confirm window will show up every time the button is clicked, but the window after the Yesclick will show only once.
Thanks, we’ll take a look at this, if you need a shorter term fix try using the Dialog class directly. It takes very little code to rebuild something that looks like the customized confirm() dialog you’re showing.
I’m still awaiting a final solution. Your last post, saying that you would look in to it was from july 6th. I’m eager to go on with this after the holiday season and would prefer a solution with isc.Confirm instead of building a canvas solution of my own. Thanks.