So far I wrote a script so that I can browse for a file and see the printed name of the file. Here is the script:
You can do this because of security reasons. Javascript don't have permission to acces to the File System, look at this answer: How to get full path of selected file on change of using javascript, jquery-ajax?