1

I am using bootstrap to show modal box. When the user chooses the select option value I just call the jQuery to show the specific modal box.

Like below:

$(document).on('change','#apply',function () {
   if($(this).val() == 1 ) {
      $('#update').modal("show");
   } else if ( $(this).val() == 2 ) {
      $('#delete_ticket_booking').modal("show");
   }
});

The HTML code of select looks like this:

<select name="apply" class="form-control full-width" id="apply">
<option value="">--Action--</option>
<option value="1">Confirm</option>
<option value="2">Delete</option>
</select>

Now, for example: when the user chooses the confirm option it's showing the confirm modal box.

Again If the user chooses the confirm option then it's showing nothing.

I need to show that modal box again when user click on the confirm option!

How can I do this?

Shibbir
  • 1,963
  • 2
  • 25
  • 48
  • It looks like you want to have a modal box that lets you confirm or cancel a booking. is that correct? – BobRodes Aug 14 '18 at 18:00
  • the full code is working fine. I just want to show any modal box again when clicking on the options again and again. – Shibbir Aug 14 '18 at 18:02
  • for example: I select confirm it will show me confirm modal box. I close this modal box. Again I want to show this confirm modal box but I can't. I need to show modal box again! – Shibbir Aug 14 '18 at 18:03
  • @imtheman Maybe that's the solution I am looking for :) – Shibbir Aug 14 '18 at 18:25
  • I understand what you're looking for, but I'm wondering if you decided to use a select box because you couldn't get a custom confirm box working, and would prefer a custom confirm modal box if you could make one. – BobRodes Aug 14 '18 at 20:16

0 Answers0