diff --git a/main/reports/index.php b/main/reports/index.php index 7189867acd..3f477ccea7 100644 --- a/main/reports/index.php +++ b/main/reports/index.php @@ -209,8 +209,8 @@ foreach($reports_template as $key => $value) $.ajax({ url: uri, success: function(data) { - elem.closest('.result').nextAll().html(''); - elem.closest('.result').next().html(data); + $(elem).closest('.result').nextAll().html(''); + $(elem).closest('.result').next().html(data); } }); } diff --git a/main/reports/reports.php b/main/reports/reports.php index 769f140460..d3ed7f1e41 100644 --- a/main/reports/reports.php +++ b/main/reports/reports.php @@ -58,8 +58,8 @@ if ($_REQUEST['format'] == 'directlink') { $.ajax({ url: uri, success: function(data) { - elem.closest('.result').nextAll().html(''); - elem.closest('.result').next().html(data); + $(elem).closest('.result').nextAll().html(''); + $(elem).closest('.result').next().html(data); } }); }