Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello...
I created a dictionary and I used ajaxtoolkit autocompele to suggest word when I write it in the text box but the suggestion just show in left side of the suggestion box I need to change
HTML
CompletionListItemCssClass 
and I want to how to do this in javascript this my code:
ajaxtoolkit:
XML
<asp:AutoCompleteExtender ID="autocom"  ClientIDMode="Static"  runat="server" CompletionSetCount="10" CompletionListElementID="list"   CompletionListItemCssClass="toolkitEnglish"
                EnableCaching="true" MinimumPrefixLength="1" TargetControlID="txtBoxWord"   ServicePath="~/translator/AutoComplete.asmx" ServiceMethod="GetCompletionList"  >

            </asp:AutoCompleteExtender>


this javascript code:
HTML
<script type="text/javascript">
          var index = 0;
          function IndexChanged() {
              index = comboboxLang.GetSelectedIndex();
              if (index == 0) {
                  $("#txtBoxWord").css("direction", "ltr");
                  $("#txtBoxWord").val("");
                  $find('autocom').set_contextKey("1");
                  $find('list').set_CompletionListItemCssClass("toolkitEnglish");

                  //$("#list").removeClass("toolkitKurdish");

                  //$("#list").addClass("toolkitEnglish");
              }
              if (index == 1) {
                  $("#txtBoxWord").css("direction", "rtl");
                  $("#txtBoxWord").val("");
                 
                  $find('autocom').set_contextKey("2");
                  $find('list').set_CompletionListItemCssClass("toolkitKurdish");

                  //$("#list").removeClass("toolkitEnglish");
                  //$("#list").addClass("toolkitKurdish");

              }
          }

            </script>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900