Source code of Windows XP (NT5)
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.
|
|
<HTML> <HEAD> <TITLE>IConfigureYourServer::BrowseForFolder test</TITLE>
<SCRIPT LANGUAGE="VBScript"> Dim srvwiz Set srvwiz = CreateObject("ServerAdmin.ConfigureYourServer")
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() { var browseResult = srvwiz.BrowseForFolder("This is the title"); showAlert(browseResult); }
function button2OnClick() { showAlert("button 2 clicked"); }
function button3OnClick() { folder(); } </SCRIPT>
</HEAD>
<BODY>
<P> <BUTTON ID="button1" NAME="button1" ONCLICK="button1OnClick()"> New Browse </BUTTON>
<BUTTON ID="button2" NAME="button2" ONCLICK="button2OnClick()"> Button </BUTTON>
<BUTTON ID="button3" NAME="button3" ONCLICK="button3OnClick()"> Old Browse </BUTTON> </P>
</BODY> </HTML>
|