aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2020-11-18 12:33:47 +0100
committerCamil Staps2020-11-18 12:33:47 +0100
commitc5e3e118e53cbfb330276ce1f6ff684ee9248682 (patch)
treef88baac84bb27aa618fd7fdf93006a33d5c80ab7
parentStrip Agade footer from emails (diff)
Fix onclick in links; do not jump to top of page
-rw-r--r--list.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/list.php b/list.php
index e3831a4..ef7f903 100644
--- a/list.php
+++ b/list.php
@@ -6,7 +6,7 @@
</head>
<body>
<h1>HebrewTools Events List</h1>
-Select <a href="#" onclick="check_all_keywords(true);">all</a> / <a href="#" onclick="check_all_keywords(false);">no</a> filters.
+Select <a href="#" onclick="return check_all_keywords(event,true);">all</a> / <a href="#" onclick="return check_all_keywords(event,false);">no</a> filters.
<div id="keyword-filters">
<?php
require_once ('db.php');
@@ -113,10 +113,12 @@ function update_keywords_field ()
elem.value=keywords.join (',');
}
-function check_all_keywords (check)
+function check_all_keywords (event,check)
{
checkboxes.map (cb => cb.checked=check);
update_keywords_field();
+
+ event.preventDefault();
return false;
}