There should be a cleaner way to do what I'm trying to do here ...
I have a jquery Ui dialog box that opens when I click on the eventClick handler in the FullCalendar plugin.
The dialog box contains information about the event. At the bottom of the form there should be an edit button that closes the dialog box and opens a new one with an editable form.
For the most part, I have succeeded in the sense that the edit button does open the edit form in the dialog box. BUT this is not a new dialog box, it is the same dialog box from the first click, with the OK and edit buttons.
How can I open a new dialog for an edit form?
Below is the eventClick function
eventClick: function(event) { if (event.url) { $('#details') .load(event.url) .dialog({ title: 'Event Details', buttons: { "Ok": function() { $(this).dialog("close"); }, "Edit": function() { $(this).dialog("close"); $('#details').load('/Events/Edit/' + event.id) .dialog({ title: 'Edit' }); } } }); return false; } },
source share