c# - two dropdowns' selection javascript -
I have a fully hidden dropdown and filter textbox flag which works entirely except if the option is already selected list In the section, then you have the idea to filter by hidden and look in the visible dropdown list, then choose from the visible and it goes to the selected list. This part works until I add another to the loop and flag, which is already in the selected list option, then leave it on the filter and it does not appear in the view list which does not work.
If I have "FROM
problem: FRENZEN is full of infinite as a list of browser and sequence.
function SearchList () {Var listHidden = Document.getElementById ('& lt;% = ddlStudentHidden.ClientID%' gt; '); Var list visible = document.getElementById (' & lt;% = ddlStudents.ClientID% & gt; '); Var list selected = document GetElementById ('& lt;% = ddl selected. Client ID% & gt;'); var txtFind = document.getElementById ('' <% = txtFind.ClientID%>;); $ ("# and lt; % = DdlStudents.ClientID% & gt; "). Find ('Options'). Remove (); (Var i = 0; i & lt; listHidden.options.length; i ++) {if (listHidden.options [ I] .text.toLowerCase (). Match (txtFind.value.toLowerCase ())) (Var i = 0; i & lt; list selected. Rows length; i ++) {if (list! Was selected, option [i] .text is selected for {/ * FROM * / var flag = false; ToLowerCase () match (txtFind.value.toLowerCase ())) {flag = true;}} if (! Flag) / * here / / $ ("# and lieutenant %% ddlStudents.ClientID%>"). Attachment ($ ('& lt; Options & gt; & Lt; / Option & gt; '). Val (listHidden option [i] .Value) .html (listHidden.options [i] .text)); }}}}
Yo has again declared the variable in the inner loop, which In the outer loop, I will override the variable in the inner loop within something else;
Comments
Post a Comment