You can use the following methods to get the general data you want.
Sub GetLogEvents(computer, filter)
On Error Resume Next
Dim cEvents
Dim oEvent
Dim oWMI : Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & computer & "\root\cimv2")
If filter = "" Then
Set cEvents = oWMI.ExecQuery("SELECT * FROM Win32_NTLogEvent", "WQL", &h10 + &h20)
Else
Set cEvents = oWMI.ExecQuery("SELECT * FROM Win32_NTLogEvent WHERE LogFile='" & filter & "'", "WQL", &h10 + &h20)
End If
For Each oEvent In cEvents
Call AddEvent("Computer Name: " & oEvent.ComputerName, oEvent.ComputerName)
Call AddEvent("Category: " & oEvent.Category, oEvent.Category)
Call AddEvent("Event Code: " & oEvent.EventCode, oEvent.EventCode)
Call AddEvent("Message: " & oEvent.Message, oEvent.Message)
Call AddEvent("Record Number: " & oEvent.RecordNumber, oEvent.RecordNumber)
Call AddEvent("Source: " & oEvent.SourceName, oEvent.SourceName)
Call AddEvent("Logged: " & oEvent.TimeWritten, oEvent.TimeWritten)
Call AddEvent("Type: " & oEvent.Type, oEvent.Type)
Call AddEvent("User: " & oEvent.User, oEvent.User)
Call AddEvent(String(15, "-"), "d01")
Next
End Sub
Sub AddEvent(text, value)
Dim oOption : Set oOption = Document.CreateElement("Option")
oOption.Text = text
oOption.Value = value
[Your HTML select element name].Add(oOption)
End Sub
I would recommend adding a date range to the event log queries as it can take a long time to populate the information you want. VBScript is not as powerful as .Net as it is complied at run-time.
As for how you are displaying the information, you might want to look at the div tag and adding the overflow css tag to it and then put a table within the div tag to make it scrollable in it's own area.
To alter between them, you can make a select statement with "System" and "Application" options. You can then pass this to the method provided to populate the log. You can obviously build upon this base code as well.
<message edited by Wakawaka on Thursday, September 08, 2011 2:06 AM>