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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnClick will not goto Sub

Status
Not open for further replies.

GrahamCracker

Programmer
Mar 10, 2006
4
US
I am using InterDev 6 (SP5) under XP.
I am trying to execute a simple call to a subroutine after pressing a button....not happening.
Here is the asp code. What am I doing wrong!!!!!

<%@ Language=VBScript %>
<%
Option explicit
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Graham's Test bed</TITLE>
</HEAD>
<BODY onload="document.GRSVAl.GrsText.focus();">

<FORM name=GRSVAl ACTION=Graham1.asp METHOD=post>
<P align=center><STRONG><FONT face=Arial size=4>Some Validation</FONT></STRONG>&nbsp;<BR></P>
<P align=center><BR>Some Number: <INPUT Name=GrsText maxlength=9><BR></P>
<P align=center><BR><INPUT TYPE=button Value="Check Something"
id=submit1 name=submit1 onclick= "call GrsSub">

<SCRIPT language="VBScript">
Sub GrsSub
MsgBox "You just hit the Button ..." ,vbCritical,"Debug"
End Sub
</SCRIPT>
</FORM>

</BODY>
</HTML>
 
It is best to do your client-side scripting with JavaScript and only use VBScript for code that will run on the server.
 
We have an Intranet Server using IE only, so VBScript is the standard at present.
The fact is that I am using a current asp that runs daily on other machines in the net, and will add some basic enhancements. However, I have found that the existing button OnClick does not execute.
Thus the basic example.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top