This content has been marked as final.
Show 3 replies
-
confirm always performs callback
Paul Masters Nov 26, 2012 7:03 AM (in response to Paul Masters)Anyone??
-
Re: confirm always performs callback
Benedict Kennedy Nov 26, 2012 7:46 AM (in response to Paul Masters)Hi Paul,
I'm very sorry, I completely missed this question. Yes the confirm callback is always fired, this is because we cant replicate the blocking feature of the native JavaScript confirm. The missing information you need is that the callback has a boolean argument so that you can tell whether OK or Cancel has been pressed. So the code you are looking for is:
confirm('Do you really want to quit?', confirmCallback); function confirmCallback(isOk) { if(isOk) { asl.exit(); } else { //Ignore, cancel pressed } }
I'm sorry for the delay, and also the developer guide as it doesn't mention this argument. I shall get the team to update it.
Best regards,
Ben
-
Re: confirm always performs callback
Paul Masters Nov 26, 2012 8:39 AM (in response to Benedict Kennedy)Hi Ben,
Ok no problem. If it was urgent I might have complained sooner, but now
I'm trying to use it somewhere else.
Thanks,
Paul
-
-