Hi All,
I have a textbox and a dropdown list on an aspx webform. The user would type in a number and then submit and the dropdown would be populated with values relevant to the typed word. If the user types a new term in the text box, I want to truncate the dropdown and when the user submits, it would submit only the text and no dropdown value (actually an empty string is ok). As the user navigates through the dropdown the page is updated with data relevant to the text and the dropdown value. I am using the following jQuery
function removeCoverageOptions() {
$("#ctl00_DefaultContent_txtClaimNumber").keypress(
function() {
$("#ctl00_DefaultContent_ddCovCert").find("option").remove();
}
);
}
I am running that on $(function(){ removeCoverageOptions(); });
It does remove the option items in the UI, but when I submit the form and debug... in page load var claimNum = txtClaimNumber.Text;
var certSeq = ddCovCert.SelectedValue;
claimNum is the correct newly typed text, but certSeq still has "999", the last selected value. Any ideas on how I can correct this. When I change claimNum, I intend certSeq to be an empty string. Is it maybe a viewstate issue?
Thanks, ~ck in San Diego