Ajax Toolkit Autocomplete

Discussion in 'ASP .Net' started by Lloyd Sheen, Sep 19, 2007.

  1. Lloyd Sheen

    Lloyd Sheen Guest

    I am trying to get this to work. Basically copied the code from the toolkit
    but absolutely nothing happens.

    Any ideas??



    The code was inserted into an existing page.

    <asp:TextBox ID="MyTextBox" autocomplete="off"
    runat="server" Width="208px"></asp:TextBox>
    <cc1:AutoCompleteExtender
    runat="server"
    BehaviorID="AutoCompleteEx"
    ID="autoComplete1"
    TargetControlID="MyTextBox"
    ServicePath="AutoComplete.asmx"
    ServiceMethod="GetStrings"
    MinimumPrefixLength="2"
    CompletionInterval="1000"
    EnableCaching="true"
    CompletionSetCount="20"
    DelimiterCharacters=";, :">
    <Animations>
    <OnShow>
    <Sequence>
    <%-- Make the completion list transparent and
    then show it --%>
    <OpacityAction Opacity="0" />
    <HideAction Visible="true" />

    <%--Cache the original size of the completion
    list the first time
    the animation is played and then set it to
    zero --%>
    <ScriptAction Script="
    // Cache the size and setup the initial size
    var behavior = $find('AutoCompleteEx');
    if (!behavior._height) {
    var target =
    behavior.get_completionList();
    behavior._height = target.offsetHeight -
    2;
    target.style.height = '0px';
    }" />

    <%-- Expand from 0px to the appropriate size
    while fading in --%>
    <Parallel Duration=".4">
    <FadeIn />
    <Length PropertyKey="height" StartValue="0"
    EndValueScript="$find('AutoCompleteEx')._height" />
    </Parallel>
    </Sequence>
    </OnShow>
    <OnHide>
    <%-- Collapse down to 0px and fade out --%>
    <Parallel Duration=".4">
    <FadeOut />
    <Length PropertyKey="height"
    StartValueScript="$find('AutoCompleteEx')._height" EndValue="0" />
    </Parallel>
    </OnHide>
    </Animations>
    </cc1:AutoCompleteExtender>
     
    Lloyd Sheen, Sep 19, 2007
    #1
    1. Advertising

  2. Lloyd Sheen

    densial Guest

    On Sep 20, 5:46 am, "Lloyd Sheen" <> wrote:
    > I am trying to get this to work. Basically copied the code from the toolkit
    > but absolutely nothing happens.
    >
    > Any ideas??
    >
    > The code was inserted into an existing page.
    >
    > <asp:TextBox ID="MyTextBox" autocomplete="off"
    > runat="server" Width="208px"></asp:TextBox>
    > <cc1:AutoCompleteExtender
    > runat="server"
    > BehaviorID="AutoCompleteEx"
    > ID="autoComplete1"
    > TargetControlID="MyTextBox"
    > ServicePath="AutoComplete.asmx"
    > ServiceMethod="GetStrings"
    > MinimumPrefixLength="2"
    > CompletionInterval="1000"
    > EnableCaching="true"
    > CompletionSetCount="20"
    > DelimiterCharacters=";, :">
    > <Animations>
    > <OnShow>
    > <Sequence>
    > <%-- Make the completion list transparent and
    > then show it --%>
    > <OpacityAction Opacity="0" />
    > <HideAction Visible="true" />
    >
    > <%--Cache the original size of the completion
    > list the first time
    > the animation is played and then set it to
    > zero --%>
    > <ScriptAction Script="
    > // Cache the size and setup the initial size
    > var behavior = $find('AutoCompleteEx');
    > if (!behavior._height) {
    > var target =
    > behavior.get_completionList();
    > behavior._height = target.offsetHeight -
    > 2;
    > target.style.height = '0px';
    > }" />
    >
    > <%-- Expand from 0px to the appropriate size
    > while fading in --%>
    > <Parallel Duration=".4">
    > <FadeIn />
    > <Length PropertyKey="height" StartValue="0"
    > EndValueScript="$find('AutoCompleteEx')._height" />
    > </Parallel>
    > </Sequence>
    > </OnShow>
    > <OnHide>
    > <%-- Collapse down to 0px and fade out --%>
    > <Parallel Duration=".4">
    > <FadeOut />
    > <Length PropertyKey="height"
    > StartValueScript="$find('AutoCompleteEx')._height" EndValue="0" />
    > </Parallel>
    > </OnHide>
    > </Animations>
    > </cc1:AutoCompleteExtender>


    have you tested the web server (AutoComplete.asmx) to ensure it works
    properly?
     
    densial, Sep 19, 2007
    #2
    1. Advertising

  3. Lloyd Sheen

    Lloyd Sheen Guest

    "densial" <> wrote in message
    news:...
    > On Sep 20, 5:46 am, "Lloyd Sheen" <> wrote:
    >> I am trying to get this to work. Basically copied the code from the
    >> toolkit
    >> but absolutely nothing happens.
    >>
    >> Any ideas??
    >>
    >> The code was inserted into an existing page.
    >>
    >> <asp:TextBox ID="MyTextBox" autocomplete="off"
    >> runat="server" Width="208px"></asp:TextBox>
    >> <cc1:AutoCompleteExtender
    >> runat="server"
    >> BehaviorID="AutoCompleteEx"
    >> ID="autoComplete1"
    >> TargetControlID="MyTextBox"
    >> ServicePath="AutoComplete.asmx"
    >> ServiceMethod="GetStrings"
    >> MinimumPrefixLength="2"
    >> CompletionInterval="1000"
    >> EnableCaching="true"
    >> CompletionSetCount="20"
    >> DelimiterCharacters=";, :">
    >> <Animations>
    >> <OnShow>
    >> <Sequence>
    >> <%-- Make the completion list transparent and
    >> then show it --%>
    >> <OpacityAction Opacity="0" />
    >> <HideAction Visible="true" />
    >>
    >> <%--Cache the original size of the completion
    >> list the first time
    >> the animation is played and then set it
    >> to
    >> zero --%>
    >> <ScriptAction Script="
    >> // Cache the size and setup the initial
    >> size
    >> var behavior = $find('AutoCompleteEx');
    >> if (!behavior._height) {
    >> var target =
    >> behavior.get_completionList();
    >> behavior._height =
    >> target.offsetHeight -
    >> 2;
    >> target.style.height = '0px';
    >> }" />
    >>
    >> <%-- Expand from 0px to the appropriate size
    >> while fading in --%>
    >> <Parallel Duration=".4">
    >> <FadeIn />
    >> <Length PropertyKey="height"
    >> StartValue="0"
    >> EndValueScript="$find('AutoCompleteEx')._height" />
    >> </Parallel>
    >> </Sequence>
    >> </OnShow>
    >> <OnHide>
    >> <%-- Collapse down to 0px and fade out --%>
    >> <Parallel Duration=".4">
    >> <FadeOut />
    >> <Length PropertyKey="height"
    >> StartValueScript="$find('AutoCompleteEx')._height" EndValue="0" />
    >> </Parallel>
    >> </OnHide>
    >> </Animations>
    >> </cc1:AutoCompleteExtender>

    >
    > have you tested the web server (AutoComplete.asmx) to ensure it works
    > properly?
    >


    Yes I have the code you are looking at is the code from the sample. It
    works on my server since I have created an application to show the toolkit
    using my IIS.

    LS
     
    Lloyd Sheen, Sep 19, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. guangnan  cheng
    Replies:
    4
    Views:
    466
    gerry
    Jun 16, 2006
  2. adelscott
    Replies:
    1
    Views:
    506
    adelscott
    Mar 1, 2007
  3. mark4asp
    Replies:
    1
    Views:
    1,147
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 24, 2007
  4. shapper

    AutoComplete - Ajax Control Toolkit

    shapper, Oct 9, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    392
    shapper
    Oct 9, 2007
  5. Stefan Filip

    AJAX Autocomplete Extender problem

    Stefan Filip, Nov 21, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    5,262
    yuriy.loginov
    Aug 28, 2012
Loading...

Share This Page