paradisewolf
Programmer
Why this javascript code does not work ?
~~~~~~~~~~~~~~~~~~~~~~~~~~
<html>
<head>
<title>Untitled Page</title>
<script language=javascript>
<!--
function GetDownloadPath()
{
var frm = document.forms[0];
var Shell = new ActiveXObject("Shell.Application");
var Folder = new Object;
Folder = Shell.BrowseForFolder(0, "Choose a download folder", 0);
var FolderItem = new Object;
FolderItem = Folder.Items().Item();
document.all.item("lblFilepath").InnerText = FolderItem.Path;
frm.lblFilepath.Text = FolderItem.Path;
}
-->
</SCRIPT>
</head>
<body>
<FORM name="Form1">
<input type="Button" name="Button1"
value="Get Download Path" onClick="GetDownloadPath()" />
</FORM>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~
<html>
<head>
<title>Untitled Page</title>
<script language=javascript>
<!--
function GetDownloadPath()
{
var frm = document.forms[0];
var Shell = new ActiveXObject("Shell.Application");
var Folder = new Object;
Folder = Shell.BrowseForFolder(0, "Choose a download folder", 0);
var FolderItem = new Object;
FolderItem = Folder.Items().Item();
document.all.item("lblFilepath").InnerText = FolderItem.Path;
frm.lblFilepath.Text = FolderItem.Path;
}
-->
</SCRIPT>
</head>
<body>
<FORM name="Form1">
<input type="Button" name="Button1"
value="Get Download Path" onClick="GetDownloadPath()" />
</FORM>
</body>
</html>