It's actually the same thing - don't you think? If you can do smth.
like Window.open("file:///C:\mycreditcard-number.txt") then you also
can go through it though you have full access to popup's Window and
Document objects. But may be i'm misunderstanding smth. here
completely.

On 8 Apr., 06:37, ffs1985 <[email protected]> wrote:
> I'm not trying to read files from filesystem from plain javascript, I
> want to open a new browsers window with a local url. The browser
> should decide how he will open this file.
>
> On Apr 7, 8:56 am, "alex.d" <[email protected]> wrote:
>
> > You CAN'T read files from filesystem from plain javascript. Applets or
> > Gears are a way to go. Another way is that user just opens your file
> > instead of downloading it ;-)
>
> > On 7 Apr., 13:04,ffs1985<[email protected]> wrote:
>
> > > Hi I'm trying to make a function that let the user download a file
> > > from my application and see it. I could copy the file from server to a
> > > local root but when I've tried to open it, does it work on hosted mode
> > > but in web mode fails always, no matter what browser I try(IE 7,
> > > Firefox and Chrome).
> > > My code is the next one:
>
> > > private void openDocument(String documentName) {
> > >                 final ManagerExportAsync manejador = 
> > > ManagerExport.Util.getInstance
> > > ();
> > >                 AsyncCallback callback = new AsyncCallback(){
> > >                         String link;
> > >                         public void onSuccess(final Object result) {
> > >                                   link = (String)result;
> > >                                   Window.open(pdfLink,"_blank","");
> > >                         }
> > >                         public void onFailure(Throwable caught){}
> > >                         };
>
> > >                 manejador.openDocument("User",userId, 
> > > documentName,callback);
> > >         }
>
> > > The String link result is something like this "file///:C:/test.jpg"
> > > I don't know what it's wrong. I read somewhere that the problem could
> > > be that I'm calling the Window.open inside the callback but I really
> > > don't know what is wrong coul someone give me a hand?
>
> > > Any suggestions?
> > > Thanks!
> > > Federico.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to