I want to have a custom close in controller that when I click the OK in alert it will close the lightbox also but I dont know how to make it. This is the link
Asked
Active
Viewed 82 times
1 Answers
0
Alert box doesn't return value on click function. what u need is a confirm box
var r = confirm("message");
if (r) {
Lightbox.closeModal()
}
Also, inject the Lightbox
to the controller.

Sachila Ranawaka
- 39,756
- 7
- 56
- 80
-
ahh yes but what if ill change the alert box with custom modal. Still I dont know what to put in `//code for closing the lightbox` – Pure Rhymer Organization Dec 18 '17 at 08:05
-
thanks for this one in their sample they didnt stated this closeModal(); – Pure Rhymer Organization Dec 18 '17 at 08:23
-
yep, I had to dig into their library to find that :D – Sachila Ranawaka Dec 18 '17 at 08:27