Just learning Classic ASP
I have some classic ASP code that creates a new folder on the server when you click the button.
Works fine, but I want to make it just run as code (process when the page loads) - so no button.
Can someone help?
The created Folder is named via a variable from database (works fine) variable is 'pRef'.
CreateFolder(Server.MapPath("documents/ "&pRef&" "))
Dim objFso
'# CREATE FOLDER
function CreateFolder(fdirCRE)
Set objFso = CreateObject("Scripting.FileSystemObject")
if Not objFso.FolderExists(fdirCRE) Then
objFso.CreateFolder(fdirCRE)
Else
Exit function
End if
Set objFso = nothing
End functionHere is the html button to make it work.
<input type="button" ID="buttonCreateFolder" value="Create Folder" OnClick="CreateFolder()" />
Thanks in advance