Clicky

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>                             
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 

Select allOpen in new window



Thanks In Advance,

asked 12/14/2011 11:26

michd's gravatar image

michd ♦♦


2 Answers:
I do notice that when I have the <script runat="server"> the functions don't show up in my webpage source.
link

answered

michd's gravatar image

michd

Found out that onchange needs to be OnSelectedIndexChanged
link

answered 2011-12-15 at 07:33:43

michd's gravatar image

michd

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×102
×104

Asked: 12/14/2011 11:26

Seen: 257 times

Last updated: 12/15/2011 02:17

Related questions