Hello there
I am using Daypilot Modal extender to show the popup screen when I click an event. I use bootstrap validation to validate my controls in my pop up window, so when I click submit button I use 
<button class="btn btn-primary" type="submit" value="Save" name="btnCreate">Save</button>
                    <button class="btn btn-default" type="submit" value="Cancel" name="btnCreate">Cancel</button>
I am NOT using Ajax post as you describe in the tutorial
 $("#frmId").submit(function () {
                var f = $("#frmId");
           
                $.post(f.action, f.serialize(), function (result) {
                    if(result == 'OK'){
                    close(eval(result));
                    }
                });
                return false;
            });
Now I have an issue.
When I click close button it returns "return JavaScript(SimpleJsonSerializer.Serialize("OK"));" and its not closing the model window. 
Briefly I want to call the following function.
function close(result) {               
                if (parent && parent.DayPilot && parent.DayPilot.ModalStatic) {
                    parent.DayPilot.ModalStatic.close(result);
                }
            }
How do i call the ablove function  from Actionresult. I want to refresh my daypilot scheduler on save.
Thanks