after clicking clear button i want to clear the input text value.Now it's clearing fine.But the value remains same in the controller.It is not reflected in the apex. how to do this ?
vf: <apex:outputPanel id="showblock" style="display:none;"> <div id="clearFilterDiv"> <apex:pageblockSection columns="3"> <apex:repeat value="{!filterArray}" var="a"> <apex:pageBlockSectionItem > <apex:outputLabel value="{!a.label}"/> <apex:inputText value="{!a.SearchValue}" id="searchTextId"/> </apex:pageBlockSectionItem> </apex:repeat> <apex:pageblockSectionItem > <apex:outputPanel id="outptText"> <a href="#" onClick="clearValue()" id="clearValue" style="display:none;"> Clear Filter </a> </apex:outputPanel> <apex:commandButton value="Apply Filter" onclick="filterSearch();return false;"/> </apex:pageblockSectionItem> </apex:pageblockSection> </div> </apex:outputPanel> script function clearValue() { $("[id$=searchTextId]").val(''); }