Page control not in context in script tag

Estapybeatt

New Member
Script tag where the error occurs\[code\]<script type="text/javascript"> $(function() { //Error The name '_documentTypeValueList' does not exist in the current context $("#<%= _documentTypeValueList.ClientID %>_ValueList").change(function() { var documentTypeTextBox = $("#<%= _documentTypeTextBox.ClientID %>").parent(); if(this.selectedIndex == 0) documentTypeTextBox.show(500); else documentTypeTextBox.hide(500); }); });</script>\[/code\]Markup of control declaration and surrounding markup. _documentTypeTextBox is in context and _documentTypeValueList USED to be in context but this code has suddenly stopped working (And I don't remember changing it)\[code\]<tait:InputContainer runat="server" LabelText="Document Type" LabelAssociatedControlID="_documentTypeValueList"> <fwc:ValueList runat="server" ID="_documentTypeValueList"> </fwc:ValueList> <div> <br/> <asp:TextBox runat="server" ID="_documentTypeTextBox" /> </div> <asp:CustomValidator runat="server" ErrorMessage="Document type must either be selected from Drop Down or typed into textbox" OnServerValidate="ValidateDocumentType" ValidateEmptyText="true"/></tait:InputContainer>\[/code\]
 
Back
Top