I'm new to this forum. I'm trying to use javascript to check if file exists on local hard disk without using ActiveX object(FileSystemObject). I tried to use the File object but I get the error: 'File' undefined Object using internet explorer 7.0.
<html><head>
<script language="javascript">
function CheckFile()
{
f = new File("c:\\user.txt")
if (f.exists)
{
alert("File exists");
}
else
{
alert("File Does not exist");
}
}
</script>
</head>
<body onLoad="CheckFile()">
</body>
</html>
thanks
<html><head>
<script language="javascript">
function CheckFile()
{
f = new File("c:\\user.txt")
if (f.exists)
{
alert("File exists");
}
else
{
alert("File Does not exist");
}
}
</script>
</head>
<body onLoad="CheckFile()">
</body>
</html>
thanks