By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

View images from local machine folder using javascript

P: 13
hi,

I need to view local machine folder images list in div tag and on click of that link should display images in img tag in php page.

Thanks in advance,

Kind Regards,
Suraj
Jul 21 '08 #1
Share this Question
Share on Google+
4 Replies


acoder
Expert Mod 15k+
P: 16,027
You can't access the local file system using JavaScript unless you have permissions. Is this for an internal application or for the web?
Jul 21 '08 #2

P: 13
You can't access the local file system using JavaScript unless you have permissions. Is this for an internal application or for the web?

it is web application. some times this link will work http://4umi.com/web/javascript/fileread.php
Jul 21 '08 #3

acoder
Expert Mod 15k+
P: 16,027
That will only work in IE if you allow ActiveX.

For something cross-browser, use a file input field to allow the user to upload local images.
Jul 21 '08 #4

rnd me
Expert 100+
P: 427
you can use ajax to find the files on the local computer, if and only if, the user runs the page from a page saved above that directory on their local machines.

i have made a "harvester" page that ran locally, and then use a script tag to send the data back to an http location. not sure if that would help you.
Jul 21 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.