Skip to main content
9 events
when toggle format what by license comment
Apr 28, 2014 at 12:03 comment added Elias Van Ootegem @user3463768: I'm not 100% what exactly you're trying to do, but just accept this one thing: You cannot access a file on the client's file-system. Just have them upload the files to your server, and process them there
Apr 28, 2014 at 11:52 comment added user3463768 Thanks for your reply Elias.In grid we store file path only.For now can you suggest any other alternative for reading file from local file as user will select the path say open?
Apr 28, 2014 at 11:45 comment added Elias Van Ootegem @user3463768: Sounds like you're barking up the wrong tree with choosing JavaScript. You're talking about uploading files, which implies a server-side technology. I'd use AJAX + whatever server-side language you're using on the server
Apr 28, 2014 at 11:36 comment added user3463768 Is there any alternative for this? My files will be stored on local system. I am using HTML file upload control to read the file from local system and displaying the path in Grid when user clicks add button after browse from file system. So we show the path of the file in grid. User selects the path in grid and clicks on open button. The file should be opened or should ask for save. Any other way you think we can achieve this requirement?
Apr 28, 2014 at 11:17 comment added Elias Van Ootegem If you are trying to load an HTML file that is hosted by your machine, then window.open('http://127.0.0.1/dirname/file.ext') will work, but that requires you to have a server running
Apr 28, 2014 at 11:15 comment added Elias Van Ootegem @user3463768: you can't. You can't open a file on the client's disk using window.open. The only thing you could do using window.open is window.open('file://<absolute path to file here>');. But there's no guarantee that'll work. JS is code that is sent to the client via the network. If it were allowed to access local files willy-nilly, then that would be incredibly unsafe. you really should look into other ways to do whatever it is you are trying to do
Apr 28, 2014 at 10:05 comment added user3463768 How an we open using window.open method? I want to open the content using window.open. Window.open should open the content.
Apr 28, 2014 at 9:43 history edited Elias Van Ootegem CC BY-SA 3.0
added 100 characters in body
Apr 28, 2014 at 9:34 history answered Elias Van Ootegem CC BY-SA 3.0