reading a file in local drive using java script
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   KAVITHA_SHIRWAL
Posted On:   Wednesday, September 14, 2011 06:10 AM

Hi,

Need to create a program using Javascript to read the binary file located in the PC(C or D drive) and copy the file contents to a variable in Java Script and send the file data to server. Can this be done without using Active X contols?
Am using 'file' input type in HTML 1.0 for getting the path of the file.

Re: reading a file in local drive using java script

Posted By:   vijay_satlawar  
Posted On:   Thursday, November 24, 2011 02:20 AM

Hi Kavitha,

This can be done using combination of Ajax and JSON.

just pass the file path to the server,

Read the content of the file in a string variable

and return that string in JSON format.

Thanks,
Vijay
About | Sitemap | Contact