i used next code for searching 'title' field in document library, but i don't know how text for searching to stay in text box after click on button search. this code is ok for searching. one more question how get automaticaly url using variable?
<script type="text/javascript">
function Search() {
var searchContent = document.getElementById('txtSearch').value;
if (searchContent != '') {
var url;
url = "http://sp/sites/test/Lists/TestFilter/AllItems.aspx?FilterName=Title&FilterMultiValue=*"+searchContent+"*";
window.location.href = url;
}
else {
alert("Something went wrong");
}
}</script><input id="txtSearch" type="text"/><input onclick="Search();" type="button" value="Submit"/>