+ function clear_censustract() {
+ // if the user manually edits the census tract, clear the 'hard' census
+ // tract field so that we can re-verify and present a confirmation popup
+
+ // get the ID of the hidden censustract field
+ var censustract_id = this.id.replace('enter_', '');
+ var el = document.getElementById(censustract_id);
+ if (el) {
+ el.value = '';
+ }
+ }
+ var el = document.getElementById('<%$pre%>enter_censustract');
+ if (el) {
+ if ( el.addEventListener ) {
+ el.addEventListener('change', clear_censustract);
+ } else if ( el.attachEvent ) {
+ el.attachEvent('onchange', clear_censustract);
+ }
+ }
+