I copied the code from another HTML script that someone before me had
written. I have no Javascript experience (I'm a VB Programmer/DBA) at
all.
The code below works to a certain extent. There are two things I need
to get rid of though. One, this code keeps the calling window open
(i.e., when you click on the URL, a new IE window opens--which is
fine--but I can't seem to get the code right to close it. This is the
Javascript I have so far:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<script language = "javascript">
function GetArg()
{
arg = (unescape(location.href)).split("?");
arg = arg[1];
return arg;
}
</script>
<title></title>
</head>
<body bgcolor="#000080">
<p align="center"><font size="5" color="#800000"><b><span
style="background-color: #FFFFFF">Opening
Database</span></b></font>
</p>
</body>
<script language = "javascript">
{
window.navigate("file:///C:/avail.bat");
parent.window.close;
}
</script>
</html>
Avail.bat is simply the following:
cmd /c start msaccess "C:\Jomar Based Availability with WIP.mdb"
If you follow the URL that calls this Javascript, you get a file open
confirmation message, which I would like to override (this URL is only
on an intranet, so it's only going to people I know) or simply stop.
How can I:
1. Close the IE window that calls this Javascript once the Access
database is open (i.e., the batch has run)?
2. Override the confirmation message that pops up?