Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
CompletionListItemCssClass 
and I want to how to do this in javascript this my code:
ajaxtoolkit:
<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:
<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 8-Dec-12 2:21am

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

  Print Answers RSS
0 Maciej Los 310
1 OriginalGriff 285
2 Afzaal Ahmad Zeeshan 200
3 Sergey Alexandrovich Kryukov 195
4 BillWoodruff 180
0 OriginalGriff 6,499
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,193
3 Manas Bhardwaj 4,657
4 Maciej Los 4,120


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 8 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100