Solved

How to get uploaded file value in JS?

Posted on 2008-10-17
5
546 Views
Last Modified: 2012-05-05
Hi all..,

        I am using a HTML file Input control to upload some files. I'm able to get the file path in IE using the command..."document.getelementbyId("filecontrolid").value. Now, the problem is if I run the application in IE its giving full filename, including filepath. But, the same code is yeilding only filename (without path) in mozilla browser. How to over come this and get the filename with filepath in both browsers???
0
Comment
Question by:sastry_hora
  • 3
5 Comments
 
LVL 15

Expert Comment

by:MMDeveloper
ID: 22742858
I'm not exactly sure this is doable. Browsers usually have some built-in restrictions to protect privacy, such as displaying full file paths.
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 22743072
Probably you can get the full path in FF.
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 22743075
Sorry, Probably you can not get the full path in FF.
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 500 total points
ID: 22743118
0
 

Author Closing Comment

by:sastry_hora
ID: 31507175
good solutions
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question