<p>I am performing two validations on the client side on the samve event.
I have defined my validations as shown below</p>

<pre><code>btnSearch.Attributes["OnClick"] = "javascript:return prepareSave(); return prepareSearch();"
</code></pre>

<p>Pseudo code for </p>

<pre><code>prepareSave():
{
  if (bPendingchanges)
    {
     return confirm('Need to save pending changes first, click OK and loose changes or cancel to save them first')
    }
  else
   {return true}
}
</code></pre>

<p>Pseudo code for </p>

<pre><code>prepareSearch():
{
  if (bNoSearchText)
    {
      alert('Please specify search criteria before proceeding')
      return false;
   }
  else
   {return true;}
}
</code></pre>

<p>When <code>bPendingchanges=false</code>, I never get the second validation running.
Anyone who can quickly spot what I have overlooked here? Please?</p>

Your second
```
return
```
statement will never be reached. Execution stops after
```
javascript:return prepareSave()
```
.
Looks like you want to return true if both functions return true - therefore, do:
```
```
btnSearch.Attributes["OnClick"] = javascript: return prepareSave() && prepareSearch();
```
```