Javascript conditional postback on button click
<p>I have a button control in my ASP.NET page which should conditionally postback based on some criteria.</p>

<pre><code>&lt;input runat="server" type="button" id="btnDone" value="Select" onclick="return SendAndCloseAdvWin();" onserverclick="serverProcessing" /&gt;
</code></pre>

<p>.</p>

<pre><code>function SendAndCloseAdvWin() {
  var win = GetRadWindow();

  if (GetRadCtrl('lstSelectors').get_checkedItems().length == 0) {
    DisplayError('Please select atleast one item.');

    return false;
  }
  else {
    if (win) {
      win.close(GetSelectedItems());
      return true;
    }
  }
}
</code></pre>

<p>If the condition is true the page should not postback, else it should postback. But i find that even if the condition fails the page does not postback. Am i missing somwething here?</p>
