Ajax.net - AutocompleteExtender Formatting
We've started using the Microsoft Ajax.net tools to add some dynamic functionality to our work lately. We met up with a problem involving the AutoCompleteExtender and Safari today. The functionality works fine with the webservice and list presentation, but the formatting was making the selected item disappear when the mouseover occurred.
Thanks to Tim Mackey's post, I was able to remember the css !important tag and override the formatting items that were otherwise eluding me.
I added this as my CompletionListElementID:
<div class="autocomplete_dropdown" id="AutoComplete" runat="server"></div>
I added this to my css
.autocomplete_dropdown{font-size:0.8em;}
.autocomplete_dropdown div:hover{color:Black !important;background-color:#EEEEEE !important;}
.autocomplete_dropdown div {color:Black !important;background-color:#FFFFFF !important;}
Using that markup, I was able to specify the color and background color for the autocomplete list as well as the hover properties for the list and happily the formatting appears the same across browsers. Why this isn't an easily modified option in the coding for this object is beyond me, but I assume that since this object got relegated to the AJAX CTP there must be other problems with it. Hopefully these will be resolved soon as this is a very useful extender.

1 Comments:
This post has been removed by a blog administrator.
Post a Comment
Links to this post:
Create a Link
<< Home