Ajax Toolkit Autocomplete

L

Lloyd Sheen

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>
 
D

densial

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?
 
L

Lloyd Sheen

densial said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top