Created
December 7, 2012 02:02
-
-
Save anonymous/4230145 to your computer and use it in GitHub Desktop.
Form handler that doesn't work in Firefox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
formEvent: function () { | |
console.log(event); // "Not defined!" -- Firefox | |
eventType = event.target.type; | |
switch (eventType) { | |
case "checkbox": | |
classArray = event.target.classList; | |
key = classArray[0]; | |
value = classArray[1]; | |
checkedStatus = event.target.checked; | |
this.toggleShown(key, value, checkedStatus, "checkbox"); | |
break; | |
case "radio": | |
this.sortThingsByColumn(event.target.className); | |
return this; | |
break; | |
case "select-one": | |
value = event.target.value; | |
key = event.target.classList[0]; | |
this.toggleSelect(key, value); | |
break; | |
default: | |
break; | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment