views:

52

answers:

0

I am trying to submit a form when 'save' is selected in a pop up window `

$dialogContent.dialog({
            modal: true,
            title: "New Listing",
            close: function() {
               $dialogContent.dialog("destroy");
               $dialogContent.hide();
            },
            buttons: {
               save : function () {
                  calEvent.id = id;
                  id++;
                  calEvent.start = new Date(startField.val());
                  calEvent.end = new Date(endField.val());
                  calEvent.title = titleField.val();
                  calEvent.body = bodyField.val();

               $.ajax({
                type: "POST",
                url: 'bum.php?method=adddetails',
                dataType: 'json',
                data: {

                    title:  titleField.val(),
                    body:  bodyField.val()
                },
                success: function(s) {
                    callback(s);
                }
            });`

But I feel that i have it all wrong as the insert action on my form action page is not being carried out.

Its fullcalendar and I am trying to insert events from the calendar directly. I have been able to extract my database info now i just need to be able to use the functions to populate my tables.

Thanks in advance