Reputation: 744
I've just started to use IMl (http://incframework.com/). Does anybody know how to call confirm dialog on IML? I mean confirm function from JavaScript.
function conf(){
confirm('text')
}
Upvotes: 2
Views: 136
Reputation: 231
You can use confirm on conditional
@(Html.When(JqueryBind.Click)
.OnSuccess(dsl =>
{
dsl.Self().Core().JQuery.Attributes.AddClass("progress-success")
.If(r => r.Is(() => !Selector.JS.Confirm("Yes or No")));
} )
.AsHtmlAttributes()
.ToButton("Are you sure ?"))
Please look at sandbox
Also if use Break with OnBegin you can stop multiple executable.
.OnBegin(dsl => dsl.Core().Break.If(r => r.Is(() => !Selector.JS.Confirm("Yes or No")))
.OnSuccess(dsl => { // something code })
Upvotes: 4