Code to input text in php filterinput on button click... not working. Is it possible? The idea is for the user to click a button (or a link - i will reformat the button later) that will fill in a jquery sharepoint filter. The Jquery filter auto filters the sharepoint list... but i want a link to do this (without postback)... best solution i could come up with was the html form webpart and a jquery script that autofilters the list onkeyup. but i want a link on the page to input text into the filter... (See code) not working
<!DOCTYPE html>
<html>
<head>
<script>
function changeText() {
x = document.getElementById("filterInput");
x.options[x.selectedIndex].text = "Melon";
}
</script>
</head>
<body>
<input type="button" onclick="changeText()" value="Test">
<input id="filterInput" type="text" name="search" size="80" style="color:silver" value="Click here and start typing your search criteria..." onfocus="if(this.value == 'Click here and start typing your search criteria...'){this.value='';}">
</body>
</html>