|
 |
asp_components thread: Error calling ASP functions from VBScript functions
Message #1 by "Paul Beeston" <paul@s...> on Sun, 26 May 2002 20:08:42
|
|
Hi,
The function ASP function "button_process()" being called from the
VBScript function "button_onClick()" is creating a "type mismatch" error.
No parameters are being passed so I am unclear as to why.
These are testing functions and don't actually do anything at the moment!
Also how can I call a VBScript function from within an ASP function?
Thanks,
Paul.
<%
dim objScript
Set objScript= Server.CreateObject("Test.WSC")
sub button_process( )
dim nValue
nValue = objScript.get_nValue()
end sub
%>
<script language="VBScript">
sub button_onClick()
dim retValue
msgBox( "in function" )
button_process( )
end sub
</script>
Message #2 by "Adrian Forbes" <adrian.forbes@n...> on Mon, 27 May 2002 08:59:12 +0100
|
|
Go to your page and View->Source. Do you see a sub called button_process?
You can't call ASP code from HTML as the ASP has finished processing before
HTML is created
-----Original Message-----
From: Paul Beeston [mailto:paul@s...]
Sent: Sunday, May 26, 2002 8:09 PM
To: ASP components
Subject: [asp_components] Error calling ASP functions from VBScript
functions
Hi,
The function ASP function "button_process()" being called from the
VBScript function "button_onClick()" is creating a "type mismatch" error.
No parameters are being passed so I am unclear as to why.
These are testing functions and don't actually do anything at the moment!
Also how can I call a VBScript function from within an ASP function?
Thanks,
Paul.
<%
dim objScript
Set objScript= Server.CreateObject("Test.WSC")
sub button_process( )
dim nValue
nValue = objScript.get_nValue()
end sub
%>
<script language="VBScript">
sub button_onClick()
dim retValue
msgBox( "in function" )
button_process( )
end sub
</script>
%%email.unsub%%
Message #3 by "Paul Beeston" <paul@s...> on Mon, 27 May 2002 14:26:06
|
|
Thanks Adrian.
That's a big leap in my understanding of the working of ASP!
Regards,
Paul.
> Go to your page and View->Source. Do you see a sub called
button_process?
You can't call ASP code from HTML as the ASP has finished processing before
HTML is created
|
|
 |