0

I need a confirm popup which shows Yes and No

Now there is javascript confirm function which shows OK Cancel buttons and always gets displayed on the top of the page.

Is there a Jquery function which shows Yes/No ?

Or at least is there a way to show the Javascript popup next to the button which makes it popup?

So far my search points to make a custom popup..

Note: the proposed link is not a duplicate: It does not answer part of my question which asks for making popup next the button.

S Nash
  • 2,363
  • 3
  • 34
  • 64
  • You can check this library: http://myclabs.github.io/jquery.confirm/ and this: http://craftpip.github.io/jquery-confirm/ – Ozan Deniz Oct 29 '15 at 16:14
  • You are correct - there is no native way for javascript to show `Yes/No` instead of `OK/Cancel` – freefaller Oct 29 '15 at 16:16
  • look at jQuery UI Dialog - https://jqueryui.com/dialog/, it satisfies your requirements, although you have to code around different modality concept – Igor Oct 29 '15 at 16:17
  • 1
    Possible duplicate of [Javascript Confirm popup Yes, No button instead of OK and Cancel](http://stackoverflow.com/questions/823790/javascript-confirm-popup-yes-no-button-instead-of-ok-and-cancel) – Gary.S Oct 29 '15 at 16:17
  • @Ozan Deniz : Understood, How about making it show next to the button? is that also impossible? – S Nash Oct 29 '15 at 16:17

1 Answers1

1

From what I understand, you're just trying to make a confirm modal that looks how you want it.

You'd basically just be including some HTML that's located where you want, and has its visibility toggled with the $.toggle() method.

Take a look at a simple example here.

Unfortunately, I don't think there's a way to modify the built-in alert() popup modal, because it's an actual system object, not just a design rendered in JS.

Harris
  • 1,775
  • 16
  • 19