Created
November 7, 2013 14:41
-
-
Save mikedugan/7355659 to your computer and use it in GitHub Desktop.
inputs text from file (ie xml) into input box
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
| //uses a select box to input content from file into a text area | |
| var sel = $('select'); | |
| sel.change(function() { | |
| var f = $(this).val(); | |
| $.get("./path/to/file/" + f, function(d) { | |
| $('textarea').val(d); | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment