Link to home
Start Free TrialLog in
Avatar of michd
michd

asked on

Can't Find OnChange= event, Undefined

I have an OnChange event that I want to call, yet I keep getting a message that it is undefined.

I have the code in a script tage with a runat=server.  It worked prior to moving it to the "server" area.  I moved it there because I actually need to update via a code file too.

<%@ Control Language="VB" AutoEventWireup="true" CodeFile="claim_auto.ascx.vb" Inherits="KeyLimeTie.CMS.Web.Common_UserControls_Custom_claim_auto" %>


<script runat="server">
    Sub change_Primary_Message(ByVal Source As Object, ByVal e As EventArgs)
        If (Not Primary_Type.SelectedIndex = 0) Then
            Primary_Message_Row.Visible = True
        Else
            Primary_Message_Row.Visible = False
        End If
    End Sub
    
    Sub change_Secondary_Message(ByVal Source As Object, ByVal e As EventArgs)
        If (Not Secondary_Type.SelectedIndex = 0) Then
            Secondary_Message_Row.Visible = True
            Secondary_Name_Label.Text = "(required)"
        Else
            Secondary_Message_Row.Visible = False
            Secondary_Name_Label.Text = ""
        End If
    End Sub
</script>

<asp:DropDownList id="Secondary_Type" runat="server" OnChange="change_Secondary_Message"></asp:DropDownList>

Open in new window


Thanks In Advance,
Avatar of michd
michd

ASKER

I do notice that when I have the <script runat="server"> the functions don't show up in my webpage source.
ASKER CERTIFIED SOLUTION
Avatar of michd
michd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial