Created
March 15, 2020 15:10
-
-
Save LouisdeBruijn/1c47fa18f06c1045467bdf8bd7f46bce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // form dynamic request for charts | |
| document.body.addEventListener( 'click', function (event) { | |
| if( event.target.className === 'form-check-input dataset' ) { | |
| const form = event.target.form; | |
| const data = new FormData(form); | |
| const request = new XMLHttpRequest(); | |
| request.open(form.method, form.action, true); | |
| request.send(data); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment