Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

URLencode

131 views
Skip to first unread message

yawnmoth

unread,
Aug 30, 2005, 10:35:34 AM8/30/05
to
When I try to run this vBScript:

MsgBox(Server.URLEncode("http://www.google.com/"))

I get the following error message:

Error: Object required: 'Server'
Code: 800A01A8

Any ideas as to why and what I might do to fix it?

Marty List

unread,
Aug 30, 2005, 7:14:22 PM8/30/05
to

"yawnmoth" <terr...@yahoo.com> wrote in message
news:1125412534....@f14g2000cwb.googlegroups.com...


How are you running this script, are you using WSH (cscript.exe or wscript.exe)?
You need to run this script from an ASP page under IIS.

http://msdn.microsoft.com/library/en-us/iissdk/iis/ref_vbom_sero.asp

yawnmoth

unread,
Aug 30, 2005, 8:43:56 PM8/30/05
to
Marty List wrote:
> <snip>

>
> How are you running this script, are you using WSH (cscript.exe or wscript.exe)?
> You need to run this script from an ASP page under IIS.
>
> http://msdn.microsoft.com/library/en-us/iissdk/iis/ref_vbom_sero.asp

I'm running this script as I would any random executable - just
clicking on the *.vbs file.

The reason I need to use URL encode is because I'm trying to send an
HTTP query to a website using the Microsoft.XMLHTTP object, and a
portion of the query will be based off of data the user inputs via
InputBox. This data needs to be URLencoded, and I'd rather not rewrite
a routine that's already in vbscript in some capacity...

Michael Reese

unread,
Aug 30, 2005, 9:11:15 PM8/30/05
to
Not really sure what you mean by URL encode, but is this what you are
looking for?
MsgBox(Escape("http://www.google.com/"))

Michael Reese

yawnmoth

unread,
Aug 31, 2005, 12:55:13 AM8/31/05
to

Yup - that's it. Thanks! :D

0 new messages