Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Trapping "File not Found"


  • From: javascript@xxxxxxxxxx (Peter Brunone)
  • Subject: [Javascript] Trapping "File not Found"
  • Date: Tue, 23 Jul 2002 22:29:57 -0500

This is a multi-part message in MIME format.

------=_NextPart_000_0077_01C23298.79980960
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Matthew,

    If you're running this locally from Internet Explorer, you can access
the FileSystemObject from a client-side script.  Then it's just a matter of
going down the available drives and finding the file you need; you don't
have to mess with HTTP error handling at all (which is good, since it's
well-nigh impossible to do in client scripting).

Cheers,

Peter

  -----Original Message-----
  From: javascript-admin@xxxxxxxxxx [mailto:javascript-admin@xxxxxxxxxx]On
Behalf Of Stern,Matthew


  Hello,

  I'm using JavaScript to create an HTML page that is the startup screen for
installation. The challenge is that the programs that can be launched from
this screen might be on two CDs. I'd like to find a way to trap the "File
not Found" error and show an alert that instructs the user to insert the
correct CD. (If there is a better way to do this, please let me know.) Note
that I'm not expecting the CD to be a specific drive letter. It could even
be a path on a network. Thanks in advance for your help.

  Matthew Stern
  Principal Technical Writer
  Best Software
  matthew.stern@xxxxxxxxxxxxxxxx
  http://www.matthewarnoldstern.com

  The opinions expressed here are solely my own.


------=_NextPart_000_0077_01C23298.79980960
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D700472303-24072002><FONT face=3DArial color=3D#0000ff =

size=3D2>Matthew,</FONT></SPAN></DIV>
<DIV><SPAN class=3D700472303-24072002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D700472303-24072002>&nbsp;&nbsp;&nbsp; <FONT =
face=3DArial=20
color=3D#0000ff size=3D2>If you're running this locally&nbsp;from =
Internet Explorer,=20
you can&nbsp;access the FileSystemObject from a client-side =
script.&nbsp; Then=20
it's just a matter of going down the available drives and finding the =
file you=20
need; you don't have to mess with HTTP error handling at all (which is =
good,=20
since it's well-nigh impossible to do in client =
scripting).</FONT></SPAN></DIV>
<DIV><SPAN class=3D700472303-24072002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D700472303-24072002><FONT face=3DArial color=3D#0000ff =

size=3D2>Cheers,</FONT></SPAN></DIV>
<DIV><SPAN class=3D700472303-24072002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D700472303-24072002><FONT face=3DArial color=3D#0000ff =

size=3D2>Peter</FONT></SPAN></DIV>
<DIV><SPAN class=3D700472303-24072002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> =
javascript-admin@xxxxxxxxxx=20
  [mailto:javascript-admin@xxxxxxxxxx]<B>On Behalf Of=20
  </B>Stern,Matthew<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D918384322-23072002><FONT =
size=3D2>Hello,</FONT></SPAN></DIV>
  <DIV><SPAN class=3D918384322-23072002><FONT =
size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D918384322-23072002><FONT size=3D2>I'm using =
JavaScript to=20
  create an HTML page that is the startup screen for installation. The =
challenge=20
  is that the programs that can be launched from this screen might be on =
two=20
  CDs. I'd like to find a way to trap the "File not Found" =
error&nbsp;and show=20
  an alert that instructs the user to&nbsp;insert the correct CD. (If =
there is a=20
  better way to do this, please let me know.) Note that I'm not =
expecting the CD=20
  to be a specific&nbsp;drive letter. It could even be a path on a =
network.=20
  Thanks in advance for your help.</FONT></SPAN></DIV>
  <DIV><FONT size=3D2></FONT>&nbsp;</DIV>
  <DIV>
  <DIV>
  <DIV>
  <P><FONT face=3DGeorgia color=3D#008000 size=3D4>Matthew Stern</FONT> =
<BR><FONT=20
  face=3DVerdana size=3D2>Principal Technical Writer<BR>Best =
Software<BR></FONT><A=20
  href=3D"mailto:matthew.stern@xxxxxxxxxxxxxxxx";><FONT face=3DVerdana=20
  size=3D2>matthew.stern@xxxxxxxxxxxxxxxx</FONT></A><BR><SPAN=20
  class=3D406454720-03012002><FONT face=3DVerdana size=3D2><A=20
  =
href=3D"http://www.matthewarnoldstern.com/";>http://www.matthewarnoldstern=
.com</A></FONT></SPAN></P>
  <P><SPAN class=3D406454720-03012002><FONT face=3DVerdana size=3D2>The =
opinions=20
  expressed here are solely my=20
own.</FONT></SPAN>&nbsp;</P></DIV></DIV></DIV></BLOCKQUOTE></BODY></HTML>=


------=_NextPart_000_0077_01C23298.79980960--