Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub calling?

Status
Not open for further replies.

adamsoderqvist

Programmer
Sep 8, 2001
136
SE
Hi,

How do I call a sub routine inside a vbscript page?

Example:
[<html>

<input type=submit name=MyButton onClick=MyButton>

</html>

<%
Sub MyButton_OnClick

Do something

End Sub
%>]

Now, the above calling procedure (the onClick-thing....) wont work. What to do?
 
if you want to call the function it is the same as in javascript
<input type=button onClick=&quot;MyButton()&quot;>

Sub MyButton()

End Sub

to use the onClick the way you specified get rid of the onClick like this
<input type=submit name=MyButton>
<%
Sub MyButton_OnClick

Do something

End Sub
%> I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top