Jump to content

VB Script Function

Guest geemail

Recommended Posts

Guest geemail

Hello,I am trying to pass the results from the following function to a span id in html and I am lost.Here is the function within my vb script:

Function GetProperDriveMappings(IPAddress)	GetProperDriveMappings = True	Dim XML	Set XML = CreateObject("Microsoft.XMLDOM")	XML.load("test.xml")	For Each Site In XML.getElementsByTagName ("Site")		Line = ""		If CompareIPs(IPAddress,Site.attributes.getNamedItem("IPLowRange").nodeValue,">=") And CompareIPs(IPAddress,Site.attributes.getNamedItem("IPHighRange").nodeValue,"<=") Then 			For Each DriveMap In site.childNodes				GetPropperDriveMappings = GetProperDriveMappings and MapADrive(DriveMap.attributes.getNamedItem("DriveLetter").nodeValue, DriveMap.attributes.getNamedItem ("UNCPath").nodeValue, False, Site.attributes.getNamedItem("LogonDomain").nodeValue + "\username", "password")		Line = Line + driveMap.attributes.getNamedItem("DriveLetter").nodeValue + " " + DriveMap.attributes.getNamedItem("UNCPath").nodeValue + vbCrLf		strHTML2 = Line	Next		End If	NextEnd Function

I am able to display the "strHtml2" results in a message box but I am unable to figure out how to pass strHtml2 a spanid in the Html code.By the way, i am using this within an HTA.Thank you in advance to anyone who can teach this newbie a new and easy code.Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...