This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes window.open() is not working for file system files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window.open() is not working for file system files" Watch "window.open() is not working for file system files" New topic
Author

window.open() is not working for file system files

Prabhakar Rao
Ranch Hand

Joined: Aug 23, 2006
Posts: 40
One of the screen in my application has a browse button and a preview button.

browse button is normal html browse button and preview button is to open a new window with the file selected by browse button.

my script could not open the file in the new window however if the file is a downloaded one it is opening in the new window.

What could be the reason behind this behavior.

Please suggest some workaround for the same.

Thanks

Prabhakar
Prabhakar Rao
Ranch Hand

Joined: Aug 23, 2006
Posts: 40
I am attaching the code that I was trying to run.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41123
    
  45
This is fundamentally impossible, because JavaScript has no access to the client file system. Imagine the security implications of a web page that contains a script opening just any client file.
[ December 05, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: window.open() is not working for file system files
 
Similar Threads
How to upload a file on the click of a button.
File Chooser Dialog box
Getting error to upload file
Opening a "Browse" window by Java Script
Open New Window