Ask a Question related to ASP Components, Design and Development.
-
thisis #1
How do I call a function in .vbs file using <script../> tags from asp page?
Hi All,
i have this.asp file:
<script src="test.vbs" runat="server" language="vbscript"></script>
<html>
<body>
1 + 2 = <%=DoSomething(1,2)%>
<div id="divLocal" />
</body>
</html>
and test.vbs file:
Function DoSomething(a, b)
DoSomething = a + b
End Function
both files are located in the same folder.
i tried to run the this.asp file and i get this error message on the
internet explorer:
1 + 2 =
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'DoSomething'
/dt/this.asp, line 5
My Question:
How do I call a function in .vbs file using <script../> tags from asp
page?
thisis Guest
-
Can serverside script call php file?
So, can asc file can call php file via LoadVars or amfPhp (remoting)? Im new to FMS2 and google doesnt seem to help me much to find good information.... -
How to call a coldfusion function defined in other coldfusion file??
inside a.cfm, it has code fragment: <cfloop> <cfinclude template="b.cfm"> </cfloop> inside b.cfm, it has code fragment: ... -
Call page from function
Hi, I'm trying to use the web timer to schedule a call to an asp page. In practice, I want the server calls an asp page that makes several jobs. The... -
How do I call an outer function from a class method function?
I'm sorry guys but this is a bad day for me. I tried researching this one and was totally stonewalled (see... -
SSI or Script Tags
Is there any advantage of one method over the other between the following for including some server-side library code? <!-- #INCLUDE... -
Daniel Crichton #2
Re: How do I call a function in .vbs file using <script../> tags from asp page?
thisis wrote on 5 Nov 2006 22:56:30 -0800:
Just tried this on IIS6 here and it works fine. What version of IIS are you> Hi All,
>
> i have this.asp file:
>
> <script src="test.vbs" runat="server" language="vbscript"></script>
>
> <html>
> <body>
> 1 + 2 = <%=DoSomething(1,2)%>
> <div id="divLocal" />
> </body>
> </html>
>
> and test.vbs file:
>
> Function DoSomething(a, b)
> DoSomething = a + b
> End Function
>
> both files are located in the same folder.
>
> i tried to run the this.asp file and i get this error message on the
> internet explorer:
>
> 1 + 2 =
> Microsoft VBScript runtime error '800a000d'
>
> Type mismatch: 'DoSomething'
>
> /dt/this.asp, line 5
>
> My Question:
>
> How do I call a function in .vbs file using <script../> tags from asp
> page?
using? This will not work on IIS4 or earlier.
Dan
Daniel Crichton Guest
-
Daniel Crichton #3
Re: How do I call a function in .vbs file using <script../> tags from asp page?
In addition to my other reply, apparently IIS5 process the <script> tag
after the rest of the page, so when it executes DoSomething in the ASP page
there is not yet a DoSomething function. IIS6 appears to change the
processing order, so unless you're using IIS6 on Windows 2003 (I can't test
IIS7 on Vista to see if this works the same, but it should) your code is not
going to work.
Dan
Daniel Crichton Guest
-
Anthony Jones #4
Re: How do I call a function in .vbs file using <script../> tags from asp page?
"Daniel Crichton" <msnews@worldofspack.com> wrote in message
news:ew71FFaAHHA.3396@TK2MSFTNGP02.phx.gbl...you> thisis wrote on 5 Nov 2006 22:56:30 -0800:
>>> > Hi All,
> >
> > i have this.asp file:
> >
> > <script src="test.vbs" runat="server" language="vbscript"></script>
> >
> > <html>
> > <body>
> > 1 + 2 = <%=DoSomething(1,2)%>
> > <div id="divLocal" />
> > </body>
> > </html>
> >
> > and test.vbs file:
> >
> > Function DoSomething(a, b)
> > DoSomething = a + b
> > End Function
> >
> > both files are located in the same folder.
> >
> > i tried to run the this.asp file and i get this error message on the
> > internet explorer:
> >
> > 1 + 2 =
> > Microsoft VBScript runtime error '800a000d'
> >
> > Type mismatch: 'DoSomething'
> >
> > /dt/this.asp, line 5
> >
> > My Question:
> >
> > How do I call a function in .vbs file using <script../> tags from asp
> > page?
> Just tried this on IIS6 here and it works fine. What version of IIS arePWS in Win 98. ;)> using? This will not work on IIS4 or earlier.
>
> Dan
>
>
Anthony Jones Guest
-
Anthony Jones #5
Re: How do I call a function in .vbs file using <script../> tags from asp page?
"Daniel Crichton" <msnews@worldofspack.com> wrote in message
news:%23lgebGaAHHA.1224@TK2MSFTNGP04.phx.gbl...page> In addition to my other reply, apparently IIS5 process the <script> tag
> after the rest of the page, so when it executes DoSomething in the ASPtest> there is not yet a DoSomething function. IIS6 appears to change the
> processing order, so unless you're using IIS6 on Windows 2003 (I can'tnot> IIS7 on Vista to see if this works the same, but it should) your code isIt works on my IIS 5.0 Win2000 server and my IIS 5.1 XP Pro. Not too> going to work.
>
surprising since I wrote it in the first place. Glad to see it works on
IIS 6 also.
What default ASP script language do you have set for the application on the
IIS5 server where it fails?
> Dan
>
>
Anthony Jones Guest



Reply With Quote

