I've got a calendar built using PHP, with occasions onto it.

I am using jQuery UI make it possible for drag and drop to maneuver the occasions around. The .droppable() function includes a callback function attached that updates the database using the new information. However the calendar must refresh to ensure that it reads in the new database values.

Are you able to pressure a webpage refresh with jQuery? Or it is possible to better method of doing this?

Maybe this is exactly what you would like?

    addClasses: false,
    accept: "div.myEvents",
    activeClass: "active",
    hoverClass: "hover",
    drop: function(event,ui) {  
        var myFormData = $(this).find("form.myEventFormData").serialize();

You can make an ajax call to some php function that re-develops the calendar after upgrading the database.


  $('#calendar').load('scriptname.php', {variable1: 'var1', etc...});


location.reload(true) may be the call you are searching for.

   drop: function(event, ui) { location.reload(true); }

If you are modifying the database without refreshing, this means you are making an HTTPXmlRequest somewhere on the way... why don't you discover if you're able to obtain that request return the alterations, increase it in-browser?

... if you desired a webpage refresh, you ought to have used a <form> submission, no? And also, since you did not, it can make me seem like you would like some Sweet Wealthy-UI Ajax Action, and at the bottom from the concepts of Sweet Wealthy-UI Ajax Action is "no refresh."