I am facing lot of problems when i am using AutoCompleteExtender while accessing in google chrome and safari i tried your suggested solution but still its not working for me.
Please help me its very very urgent to fix this issue as i have a release next week
The i have used is as follows :
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" ScriptMode="Release" EnablePageMethods="True" CombineScripts="true">
<Scripts>
<asp:ScriptReference Path="~/scripts/webkit.js" />
</Scripts>
</ajaxToolkit:ToolkitScriptManager>
Where ajaxToolkit is the registered prefix for AjaxControlToolkit and the script file webkit.js contains the following code:
Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
if( navigator.userAgent.indexOf( 'WebKit/' ) > -1 )
{
Sys.Browser.agent = Sys.Browser.WebKit;
Sys.Browser.agent = Sys.Browser.WebKit;
Sys.Browser.version = parseFloat( navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
Sys.Browser.name = 'WebKit';
}
AutoCompleteExtender code is as follows :
<ajaxToolkit:AutoCompleteExtender id="autoComplete1" runat="server" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" CompletionListItemCssClass="autocomplete_listItem" CompletionListCssClass="autocomplete_completionListElement" UseContextKey="True" ServiceMethod="GetCompletionList" MinimumPrefixLength="1" CompletionSetCount="30" EnableCaching="false" CompletionInterval="500" TargetControlID="companytxt" BehaviorID="AutoCompleteEx">
<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>
</ajaxToolkit:AutoCompleteExtender>