diff options
author | Camil Staps | 2020-11-18 12:33:47 +0100 |
---|---|---|
committer | Camil Staps | 2020-11-18 12:33:47 +0100 |
commit | c5e3e118e53cbfb330276ce1f6ff684ee9248682 (patch) | |
tree | f88baac84bb27aa618fd7fdf93006a33d5c80ab7 | |
parent | Strip Agade footer from emails (diff) |
Fix onclick in links; do not jump to top of page
-rw-r--r-- | list.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } |