Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-19-2004, 03:40 PM   PM User | #1
Amanda Wansley
New to the CF scene

 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Amanda Wansley is an unknown quantity at this point
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 03:56 PM..
Amanda Wansley is offline   Reply With Quote
Old 04-22-2004, 05:31 AM   PM User | #2
black3842
New Coder

 
Join Date: Apr 2004
Location: Texas
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
black3842 is an unknown quantity at this point
I responded to your duplicate post here:
http://www.codingforums.com/showthread.php?t=37167
__________________
Jason B
black3842 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:12 PM.


Advertisement
Log in to turn off these ads.