I'm trying to use the SPAutocomplete function with a Text Filter Webpart to search through text titles in a list. The autocomplete actually works fine however when I select the list item I want to use, the text filter box is momentarily populated and the page auto refreshes to run the filter but it changes the text back to my original text snippet. i.e. it doesn't hold the select text value.
I think the onchange event in the webpart may be fired right before it can use the selected text?
The Sharepoint Webpart code is:
I think the onchange event in the webpart may be fired right before it can use the selected text?
The Sharepoint Webpart code is:
<b>Text Filter</b><br/><input name="ctl00$m$g_a88fe500_10fe_4579_af9e_d6717304b197$SPTextSlicerValueTextControl" type="text" maxlength="255" onchange="SetApplyFiltersToActiveIfPresent();setTimeout('__doPostBack(\'ctl00$m$g_a88fe500_10fe_4579_af9e_d6717304b197$SPTextSlicerValueTextControl\',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="ctl00_m_g_a88fe500_10fe_4579_af9e_d6717304b197_SPTextSlicerValueTextControl" style="width:97%;" />
And I just use the following within the ready function to add the title name which works fine:document.getElementById('ctl00_m_g_a88fe500_10fe_4579_af9e_d6717304b197_SPTextSlicerValueTextControl').title = 'ConcernFilter';
Thank you