Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelminter/961846 to your computer and use it in GitHub Desktop.
Save michaelminter/961846 to your computer and use it in GitHub Desktop.
JQuery : take filename from file input and append to text input box
$("#site_file_file").change(function(){
file_name = $("#site_file_file").val().split("\\").pop().split(".");
file_name.pop();
$("#site_file_label").val(file_name);
$("#site_file_label").focus();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment