Hello,
I am trying to create a JavaScript function and am getting the following
error: 'jsFormValidation' is not a member of 'ASP.ciJava_aspx'.
Sub Page_Load(Sender As Object, E As EventArgs)
Dim ctrlValidate As String = tbxSubmitter.ID
Dim strFormValidation As String = _
"<script language='javascript'> function jsFormValidation() {" & _
"alert('Please enter your Name in the |Name| field.');" & _
"document.getElementById('" & ctrlValidate & "').focus();}" & _
"<" & "/script>"
If(Not IsClientScriptBlockRegistered("jsFormValidation"))
RegisterClientScriptBlock("jsFormValidation", strFormValidation)
End If
End Sub
In the form:
<td width="100" align="center">
<asp:ImageButton runat="server"
ImageURL="../../images/art_dbflash_go.jpg"
ImageAlign="Middle"
AlternateText="sckeels"
OnCommand="jsFormValidation(this)"
CommandName="ASPNET"/>
</td>