View Full Version : help: how to use vbs in webpage

04-28-2009, 04:31 PM
hi everybody

could someone please tell me how to use this in webpage?

dim loggit_logfilename, loggit_fso, loggit_silent

loggit_logfilename = ".\exec.log"
loggit_silent = true ' log file only or with MsgBox/Echo
set loggit_fso = CreateObject("Scripting.FileSystemObject")

loggit "Started..."

loggit "Done."

' -=-=-=-=-=-=-=-=-=-
sub loggit (msg)
set stream = loggit_fso.OpenTextFile(loggit_logfilename, 8, True)
stream.writeline date & " " & time & ": " & msg
if not loggit_silent then
WScript.echo msg
end if
end sub



04-28-2009, 05:24 PM
As a client side or server side thing?

If it is the client side, you don't want to unless your audience is in a very controlled environment. VBScript as a client side scripting language is only supported in Internet Explorer.