<ItemTemplate>
<asp:TextBox ID="txtReviewM" OnChange="javascript:HandlerCodeTextChange(this);
Text='<%# Bind("ch_slcode") %>' runat="server" Width="100%" Columns="50"
AutoPostBack="true"> </asp:TextBox>
<asp:HiddenField ID="hidempCode" runat="server" />
<asp:HiddenField ID="hidempName" runat="server" />
<ajaxtoolkit:autocompleteextender id="aceHandler2" runat="server"
targetcontrolid="txtReviewM" usecontextkey="true" completionsetcount="10"
completioninterval="500" enablecaching="false" minimumprefixlength="1"
servicemethod="GetEmployee" firstrowselected="true"
completionlistcssclass="AutoExtender"
completionlistitemcssclass="AutoExtenderList"
completionlisthighlighteditemcssclass="AutoExtenderHighlight">
</ajaxtoolkit:autocompleteextender>
</ItemTemplate>
これは私のJavascript関数です
function HandlerCodeTextChange(txtBox) {
if (txtBox.value.indexOf(':') == "-1") {
txtBox.value = "";
txtBox.focus();
document.getElementById('<%=hidempCode.ClientID%>').value = "";
document.getElementById('<%=hidempName.ClientID%>').value = "";
}
else {
var code = txtBox.value.split(':');
document.getElementById('<%=hidempCode.ClientID%>').value = code[0];
document.getElementById('<%=hidempName.ClientID%>').value = code[1];
}
}
隠しフィールドがjavascriptで見つかりません、どうすればそれを達成できますか?