Use addEventListener().
authorCMDR furrycat <elite@furrycat.net>
Tue, 19 Jan 2016 07:25:56 +0000 (02:25 -0500)
committerCMDR furrycat <elite@furrycat.net>
Tue, 19 Jan 2016 07:25:56 +0000 (02:25 -0500)
entry.js

index 64e7241..bd97c91 100644 (file)
--- a/entry.js
+++ b/entry.js
@@ -682,7 +682,7 @@ function checkpoint(id) {
   input.maxLength = input.size = 19;
   input.id = input.name = id;
   input.tabIndex = parseInt(id.replace(/^lap(\d+)station\d+$/, function(ignored, ret) { return ret; }));
-  input.onchange = changed;
+  input.addEventListener('change', changed, true);
   return input;
 }
 
@@ -695,7 +695,7 @@ function hull(lap, suffix) {
   input.pattern = '^(?:0|100|[1-9][0-9]?)$';
   input.maxLength = input.size = 3;
   input.id = input.name = 'lap' + String(lap) + 'hull' + suffix;
-  input.onchange = changed_hull;
+  input.addEventListener('change', changed_hull, true);
   return input;
 }
 
@@ -801,7 +801,7 @@ function loaded() {
     });
   }
   var joker = get_joker();
-  if (joker) joker.onchange = changed_joker;
+  if (joker) joker.addEventListener('change', changed_joker, true);
   if (typeof distances != 'undefined') update_raikogram(table);
   validate(table);
   var stats = document.getElementById('stats').getElementsByTagName('table')[0];