Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Output vbscript and WMI in HTML

    undefinedundefinedundefined

    I am an intern with the task of writting an interface for a hardware database.
    I have to take some code my supervisor wrote and try to output it in HTML, but in a way that it can be edited after it is output. Here is the code. My problem is getting the html to recognize the vbscript procedure. Is it a good idea to make it a procedure? Does any have any suggestions? I need help bad.

    <HTML>
    <BODY>
    <HEAD>
    <TITLE>onemore</TITLE>

    <script language="vbscript">

    Sub_cmdButton onClick()

    Dim Name As String
    Dim Model As String


    Model = strmsg & "Model: " & objItem.Model CRLF
    Name = strmsg & "Name: " & objItem.Name


    'strComputer = "."
    strComputer = InputBox("Please enter the name of the computer[insert a period '.']
    for the current machine")
    If strComputer = "" Then
    wscript (0)
    End If

    Set objWMIService = GetObject("winmgmts:"_
    &"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")


    'Win32_ComputerSystem
    Set colItems = objWMIService.ExecQuery('Select * from
    Win32_ComputerSystem",,48)


    For Each ObjItem in colItems
    Memformat = Cint(objItem.TotalPhysicalMemory/1000000)
    </script>

    </HEAD>

    <BODY onload = "cmdButton()">

    <script langauge = "javascript">

    document.write(Name)
    document.write(Model)

    </scrip>
    </BODY>

    </HTML>
    Last edited by Amanda Wansley; 04-19-2004 at 04:56 PM.

  • #2
    New Coder
    Join Date
    Apr 2004
    Location
    Texas
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I responded to your duplicate post here:
    http://www.codingforums.com/showthread.php?t=37167
    Jason B


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •