This project has moved. For the latest updates, please go here.

SPAutocomplete appends html

Aug 13, 2012 at 6:55 PM

I've implemented the SPServices.SPAutocomplete function in a content editor web part.  There is a simple input text field as well. 

It works well, however i noticed that everytime it is run, it appends html like below to the CEWP:

<div><ul id="SPAutocomplete_" style="z-index: 40; border-bottom: #2a1faa 1px solid; position: absolute; border-left: #2a1faa 1px solid; padding-bottom: 2px; background-color: #fff; margin: 0px; padding-left: 2px; width: 250px; padding-right: 2px; display: none; border-top: #2a1faa 1px solid; border-right: #2a1faa 1px solid; padding-top: 2px"></ul>

Currently have about 10 <ul>'s like above that appear after my input.  These are obviously the ul's of the result, but is there a way to clear them? 

If this is unknown issue, i can post my code, but it's the basic implementation, nothing crazy.

thank you

Aug 17, 2012 at 3:11 AM

I add that markup to the page to contains the autosuggest data. Are you calling SPAutocomplete more than once for the column? You should only be calling it once, which sets it all up.