From 1e0c502de80d24d0d13f0b5ed2d21a0c3b04511b Mon Sep 17 00:00:00 2001 From: james Date: Mon, 29 Mar 2010 20:57:04 +0000 Subject: [PATCH] reload the report list in the callback after the report list is saved, otherwise the reload causes a race condition with the json and (in my case) usually the reload wins. --- admin/reports.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/reports.php b/admin/reports.php index f43bc71..6d71b7a 100644 --- a/admin/reports.php +++ b/admin/reports.php @@ -170,8 +170,9 @@ function edit_report(id,reports_id) function save_report() { - $('#debug').load("?action=save", $('#report_form').serializeArray()); - window.location.reload(); + $('#debug').load("?action=save", $('#report_form').serializeArray(), function() { + window.location.reload(); + }); } function add_report()