Blog
Welcome to the Trioro Tech Blog.
On this blog we post some of the technical challenges and solutions that we've come across. From time to time we also post comments on new technology that we've come across.

Wednesday, December 20, 2006

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.

2 Comments:

At 11:56 PM, Anonymous Anonymous said...

This post has been removed by a blog administrator.

 
At 11:06 AM, Anonymous Anonymous said...

very nice it worked for me what i was looking for.

Thanks a lot
Rahul

 

Post a Comment

Links to this post:

Create a Link

<< Home