thisis
Sun Nov 05 23:47:07 CST 2006
Mike Brind wrote:
> "Anthony Jones" <Ant@yadayadayada.com> wrote in message
> news:eky4elNAHHA.3928@TK2MSFTNGP03.phx.gbl...
> >
> > "Mike Brind" <paxtonend@hotmail.com> wrote in message
> > news:Oc$g9JFAHHA.5060@TK2MSFTNGP02.phx.gbl...
> >>
> >> "thisis" <helloOne@web.de> wrote in message
> >> news:1162671288.445833.214670@m73g2000cwd.googlegroups.com...
> >> > Hi All,
> >> >
> >> > i have this.asp page:
> >> >
> >> > <script type="text/vbscript">
> >> > Function Body_Onload()
> >> > ' create the object
> >> > Set obj = Server.CreateObject("UploadImage.cTest")
> >> > ' use method of the object
> >> > Body_Onload = obj.cTestDelete
> >> > Set obj = Nothing
> >> > End Function
> >> > </script>
> >> >
> >> > <html>
> >> > <body onload="Body_Onload()">
> >> > </body>
> >> > </html>
> >> >
> >> > the this.asp gives an Error while running:
> >> > Line 4
> >> > Char 1
> >> > Error Object required 'Server'
> >> > Code 0
> >> > URL
http://127.0.0.1/this/this.asp
> >> >
> >> > my Question:
> >> > How to create a Server Object in a Function?
> >> >
> >>
> >> You can't call server-side code directly from client-side code. You'll
> > need
> >> to send an asynchronous http request from the browser to a server-side
> >> script which can then make calls to Server.CreateObject. Some people
> >> call
> >> it Ajax. Have a look here:
http://www.w3schools.com/ajax/
> >
> > Why does it need to asynchronous? I many cases this is undesirable.
> >
>
> How do you mean?
Hi Mike Brind,
I looked at the link you gave, thanks.
I don't understand what's ajax got to do with my question in the start
of this thread:
How to create a Server Object in a Function using VBScript?