0

I am trying to implement dialog windows for events in fullcalendar instead alert and prompt window in a easy way. Any example will be really apreciated.

   select: function(start, end, allDay) {
        var title = bootbox.prompt("Hello World!", function(result) {
     if (result) {
     if (title) {
   var start = $.fullCalendar.formatDate(start, "yyyy-MM-dd HH:mm:ss");
   var end = $.fullCalendar.formatDate(end, "yyyy-MM-dd HH:mm:ss");
   $.ajax({
   url: 'add_events.php',
   data: 'title='+ title+'&start='+ start +'&end='+ end,
   type: "POST",
   success: function(json) {
   bootbox.alert('Added Successfully');
   }
   });
     }
    });

1 Answer 1

1

Take a look at some CSS/JS frameworks like Twitter Bootstrap or Zurb (there are others, some specifically for this kind of thing). Generally, they will have Modals/Dialogs/alerts that can be called programmatically from JS.

e.g.

success: function(json) {    
   $(".alert").alert();    //Bootstrap alert popup
}
1
  • @S Farron I Have updated the code. I have used bootbox, but I think I am missed with callback. Thanks Commented Dec 6, 2013 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.