mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.3 KiB
71 lines
1.3 KiB
<HTML>
|
|
<HEAD>
|
|
<TITLE>IConfigureYourServer::BrowseForFolder test</TITLE>
|
|
|
|
<SCRIPT LANGUAGE="VBScript">
|
|
Function showAlert(strAlertString)
|
|
MsgBox strAlertString
|
|
End Function
|
|
|
|
</SCRIPT>
|
|
|
|
<SCRIPT LANGUAGE=VBScript>
|
|
Function folder()
|
|
Dim oShell, oFolder, oFolderItem
|
|
CONST ssfDRIVES = 17 'ShellSpecialFolderConstants
|
|
|
|
Set oShell = CreateObject("Shell.Application")
|
|
|
|
On Error Resume Next
|
|
Set oFolder = oShell.BrowseForFolder(0, "Select a Share Folder", 0 , ssfDRIVES)
|
|
Set oFolderItem = oFolder.Items.Item
|
|
|
|
thePath = Trim(oFolderItem.Path)
|
|
|
|
If InStr(thePath, "::{") Then
|
|
showAlert "Please select a folder."
|
|
form.btnFindFolder.focus()
|
|
folder()
|
|
Elseif thePath = "" OR IsNull(thePath) Then
|
|
Exit Function
|
|
Else
|
|
form.txtFolderName.value=oFolderItem.Path
|
|
form.txtShareName.focus()
|
|
End if
|
|
Set oShell = nothing
|
|
End Function
|
|
</SCRIPT>
|
|
|
|
<SCRIPT LANGUAGE="JScript">
|
|
function
|
|
button1OnClick()
|
|
{
|
|
folder();
|
|
}
|
|
|
|
function
|
|
button2OnClick()
|
|
{
|
|
showAlert("button 2 clicked");
|
|
}
|
|
|
|
</SCRIPT>
|
|
|
|
|
|
</HEAD>
|
|
|
|
|
|
<BODY>
|
|
|
|
<P>
|
|
<BUTTON ID="button1" NAME="button1" ONCLICK="button1OnClick()">
|
|
Browse
|
|
</BUTTON>
|
|
|
|
<BUTTON ID="button2" NAME="button2" ONCLICK="button2OnClick()">
|
|
Button
|
|
</BUTTON>
|
|
</P>
|
|
|
|
</BODY>
|
|
</HTML>
|