diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index f0fceb521da..dffde749fbe 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5198,6 +5198,7 @@ class Form
var urljump=pageno + (pageno.indexOf("?") < 0 ? "?" : "") + options;
//alert(urljump);
if (pageno.length > 0) {
+ '.$jsforcursor.'
location.href = urljump;
console.log("after location.href");
}