I have a web part for searching for contacts in our directory, which works fine. You type in the letters, and it web part will autocomplete with lastnames that start with the entered text. Now, I need to search using a wildcard, so when text is entered, it will match last names or first names.
Below is the javascript function for how the search currently works:
function commitSearch(text) { var frame = document.getElementById("contactFrame"); if (text == "") frame.src = "Results.aspx?ReturnAll=Yes"; else frame.src = "Results.aspx?Search=" + text; }
The last line is the line that needs to be modified. The wildcard needs to be placed as a querystring, that will search for any text that includes "text" within it, whether it's the last name or the first name.
Any ideas how to add the wildcard in the querystring for the code?
Thanks