[web] Visual Basic & HTML

Started by
18 comments, last by Kylotan 19 years, 6 months ago
Hi all, I have written a VB script to detect a users bios settings and want the information to be displayed in tables using html when they open the page. The code is: ----------------------------------------------------------------- On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48) For Each objItem in colItems Wscript.Echo "BuildNumber: " & objItem.BuildNumber Wscript.Echo "Caption: " & objItem.Caption Wscript.Echo "Description: " & objItem.Description Wscript.Echo "Manufacturer: " & objItem.Manufacturer Wscript.Echo "Name: " & objItem.Name Wscript.Echo "ReleaseDate: " & objItem.ReleaseDate Wscript.Echo "SMBIOSBIOSVersion: " & objItem.SMBIOSBIOSVersion Wscript.Echo "SMBIOSMajorVersion: " & objItem.SMBIOSMajorVersion Wscript.Echo "SMBIOSMinorVersion: " & objItem.SMBIOSMinorVersion Wscript.Echo "SoftwareElementID: " & objItem.SoftwareElementID Wscript.Echo "TargetOperatingSystem: " & objItem.TargetOperatingSystem Wscript.Echo "Version: " & objItem.Version Next ----------------------------------------------------------------- At the moment this displays the information in a pop-up box and obviously doesnt use html. All I really need to know what to do is put this in with the html code and display it on the webpage instead of using the dialogue box. If someone could help I would really appreciate it. Thanks David
Advertisement
Before I answer, is this VBScript embedded in a webpage or is it a standalone VB App?
This is stand alone at the moment yes, but I want it embedded in the webpage or for the page to access the script to retrieve the info

David
If you put
<script language="VBScript">response.write "something"</script>

anywhere in your HTML page, wherever you put it, the text "something" will appear. You can use this to print out the variables.
So you'll create an MMORPG, uh? Well, what about reading THIS?
Moved to WebDev.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Could you give me an example please?

Thanks

David
Replace your Wscript.Echo's with response.write's and build a table around it, then embed it in your webpage.
Still not getting it, please clould you give me an example?

Thanks

David
An example within HTML would be useful as I have tried the above but I either got a blank page or an error

Thanks
Is this server-side scripting or client side?

This topic is closed to new replies.

Advertisement