Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AutoCompleteExtender Javascript Errors

$
0
0

Hi,

I have a AutoCompleteExtender on my page which is made up of a nested masterpage. The Autocomplete works great however i can't seem to be able to apply styles to the CompletionListItemCssClass and the CompletionListHighlightedItemCssClass when i do i get a horrible javascript error. The CompletionListCssClass works great, it's just the other two i am having problems with, and only when you hover over the second item in the list.

For a bit more detail the error i am receiving is [Exception... "'Sys.ArgumentNullException: Sys.ArgumentNullException: Value cannot be null. Parameter name: className' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]. Also the CSS classes are being applied, i just get the error message which is a bit annoying.

Why have the AJAX Control Toolkit people decided to apply a separate style to each of them instead of just using css selectors e.g. ul > li > li a > li a:hover? This would load a lot faster and wouldn't need to the javascript to swap the css classes around.

 

            <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
                TargetControlID="to"
                ServiceMethod="GetCompletionList"
                ServicePath="autoComplete.asmx"
                MinimumPrefixLength="3"
                EnableCaching="true"
                CompletionListCssClass="autocomplete"
                CompletionSetCount="10"

               CompletionListItemCssClass="item"
            >
            </cc1:AutoCompleteExtender>

Thanks

Daniel

 

 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>