mongoose0031800 Posted August 15, 2011 Share Posted August 15, 2011 Hello, I'm trying to add a line to my jQuery function that would make the page refresh after the AJAX was finished. This is my original script below that works fine. $(document).ready(function() { $("#show_list").sortable({ handle : '.handle', update : function () { var order = $('#show_list').sortable('serialize'); $("#info").load("scripts/process_show_order.php?"+order); } }); }); And this is my modified script that doesn't work. $(document).ready(function() { $("#show_list").sortable({ handle : '.handle', update : function () { var order = $('#show_list').sortable('serialize'); $("#info").load("scripts/process_show_order.php?"+order); }, location.reload(); }); }); I added the , after the function ended } and then on the next line I added location.reload();...which broke the script. Am I doing something wrong? Mongoose Quote Link to comment https://forums.phpfreaks.com/topic/244875-jquery-possible-syntax-or-format-issue/ Share on other sites More sharing options...
mongoose0031800 Posted August 16, 2011 Author Share Posted August 16, 2011 Ok problem solved. But here's the code that fixed it in case anyone else has the same issue. $(document).ready(function() { $("#show_list").sortable({ handle : '.handle', update : function () { var order = $('#show_list').sortable('serialize'); $("#info").load("scripts/process_show_order.php?"+order,function(){ location.reload(); }); } }); }); Quote Link to comment https://forums.phpfreaks.com/topic/244875-jquery-possible-syntax-or-format-issue/#findComment-1257927 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.