View images from local machine folder using javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • surajhs
    New Member
    • Jul 2008
    • 13

    View images from local machine folder using javascript

    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
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

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

    Comment

    • surajhs
      New Member
      • Jul 2008
      • 13

      #3
      Originally posted by acoder
      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

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        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.

        Comment

        • rnd me
          Recognized Expert Contributor
          • Jun 2007
          • 427

          #5
          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.

          Comment

          Working...