[Javascript] Re: Opening file on server with JS

Peter Brunone peter at brunone.com
Thu Nov 8 19:42:16 CST 2001


	Oh, okay; I was just confused because the subject line for this entire
thread says "Opening file on server" :-)

	I believe this question has been asked quite often recently, and the
response is almost always "you can't do that because it would be a huge
security risk if javascript could open files on the client machine".  Even
if you can do this, you'd probably need a signed script...

|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of phumes1 at home.com
|Sent: Thursday, November 08, 2001 6:01 PM
|To: javascript at LaTech.edu
|Subject: RE: [Javascript] Re: Opening file on server with JS
|
|
|
|I want the file to open on the client PC.
|
|At 11:49 PM 11/8/2001 +0000, you wrote:
|>Yeah, should do.  Isn't that what he [phumes1] wanted?
|>
|>  .b
|>
|> > -----Original Message-----
|> > From: javascript-admin at LaTech.edu
|[mailto:javascript-admin at LaTech.edu]On
|> > Behalf Of Peter Brunone
|> > Sent: 08 November 2001 22:52
|> > To: javascript at LaTech.edu
|> > Subject: RE: [Javascript] Re: Opening file on server with JS
|> >
|> >
|> >
|> >       Won't that try to open a file on the client rather than on
|> > the server?
|> >
|> > |-----Original Message-----
|> > |From: javascript-admin at LaTech.edu
|[mailto:javascript-admin at LaTech.edu]On
|> > |Behalf Of .ben
|> > |Sent: Thursday, November 08, 2001 3:37 PM
|> > |To: javascript at LaTech.edu
|> > |Subject: RE: [Javascript] Re: Opening file on server with JS
|> > |
|> > |
|> > |How about using the onLoad event?
|> > |
|> > |function openThing()
|> > |{
|> > |     document.location.href = 'file://x:\directory\test\filename.dat';
|> > |}
|> > |
|> > |<body onLoad="openThing();">
|> > |
|> > |see if that works.
|> > |
|> > | .b
|> > |
|> > |> -----Original Message-----
|> > |> From: javascript-admin at LaTech.edu
|> > [mailto:javascript-admin at LaTech.edu]On
|> > |> Behalf Of phumes1 at home.com
|> > |> Sent: 08 November 2001 21:18
|> > |> To: Javascript at LaTech.edu
|> > |> Subject: [Javascript] Re: Opening file on server with JS
|> > |>
|> > |>
|> > |>
|> > |> How can I open a file or load a file with JS automatically
|from a page
|> > |> rather than having to click on a link?
|> > |>
|> > |> I have the following link in a file.
|> > |>
|> > |> <a href="file://x:\directory\test\filename.dat">Open file</a>
|> > |>
|> > |> How can I have this execute automatically. I don't want to
|> > have to click
|> > |> on the link.
|




More information about the Javascript mailing list