- Come-on smarty pants answer this!
- Posted by Malice on November 18th, 2004
I need to declare a global variable using VBScript in a desktopx. Sounds
easy? I thought so too, but how do you do it?
I'm using the "onreadystatechange" method of Microsoft.XMLHTTP because I'm
having trouble with the http response not refreshing with the target file.
The error I get is a "can't find xml.responseText" at the line that calls,
the "getScore" procedure. That means that the global variable isn't being
recognised, yes???
This is what I've got so far.....
+_________________________________________________ _________________+
'Declare public variable
Dim xml
Sub getXML()
' Create an xmlhttp object:
Set xml = CreateObject("Microsoft.XMLHTTP")
'Opens the connection To the remote server.
xml.Open "GET", "http://mywebaddress.com/myfile.xml", False
'when the response returns call processing methods
xml.onreadystatechange = _
getref("processXML")
'Actually Sends the request And returns the Data:
xml.Send
End Sub
Sub processXML()
getScore(xml.responseText)
getRecentOvers(xml.responseText)
Set xml = Nothing
End Sub
+_________________________________________________ _________________+
- Posted by TheGreenReaper \(Laurence Parry\) on November 21st, 2004
"Malice" <me@here.there> wrote in message news:vTZPX0bzEHA.396@Solo...
This may be a silly question, but are you absolutely sure you're calling
the getXML function before you call the processXML function, or any
other using xml.anything? If you don't, it won't find it, because you
haven't set it.
Also, that getref command looks awfully suspicious, but maybe that's
just because I haven't seen it before. :-)
--
TheGreenReaper (Laurence Parry)
http://www.greenreaper.co.uk/
- Blueyonder is pants (Internet & Broadband) by Justin
- I was sure this would never work, and it did, I almost peed my pants! (Laptops/Notebooks) by liz_wilkinson@hotmail.com
- I was sure this would never work, and it did, I almost peed my pants! (Software & Applications) by liz_wilkinson@hotmail.com
- Re: Who Wears The Pants In Windows? (Computers & Technology) by kier
- Re: Who Wears The Pants In Windows? (Computers & Technology) by kier

