function check(){
var user = document.getElementById('pg:frm:nPB:ip').value;
if(user == ''){
alert('Please Enter noise Name before Proceeding.');
return true;
}
else{
noiseSearch();
return true;
}
</script>
<apex:commandButton value="Search" onclick="check();"
action="{!noiseSearch}" reRender="nPbt" />
controller
public class controller{
public pageReference noiseSearch(){
//logic
return null;
}
}
,i tired with about code,but my noisesearch() not called,i want to know why it is not called